Notification display method and terminal

ABSTRACT

This application discloses a notification display method. The method comprises: when there is a to-be-notified event, displaying, by a terminal, a notification by classification based on a notification type of the notification corresponding to the to-be-notified event; and displaying, by the terminal, in different display modes based on a priority of the notification, wherein the different display modes comprise: displaying in expanded form or displaying in collapsed form in the corresponding display pane, or the different display modes comprise: displaying in a first mode or displaying in a second mode in the corresponding display pane, and content displayed in the first mode is more than content displayed in the second mode.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a National Stage of International Application No.PCT/CN2017/104884, filed on Sep. 30, 2017, which is hereby incorporatedby reference in its entirety.

TECHNICAL FIELD

This application relates to the field of terminal application, and inparticular, to a notification display method and a terminal.

BACKGROUND

As intelligent terminals become more popular in people's daily life,people have more relied on the intelligent terminals. There has been anexplosive growth in the number of and types of applications on aterminal. To attract the attention of users and increase the number oftapping to use by the users, notification messages are indiscriminatelysent by many applications in an uncontrolled way. Consequently, the useexperience of the users is greatly affected, and the explosion of junkinformation seriously affects the normal use of the users.

Many users want to have control over notification messages onintelligent terminals. Currently, terminal manufacturers and somedevelopers are trying to find out solutions to this problem, to provideusers with a more efficient and intuitive way of instant access to thesenotification messages.

SUMMARY

Embodiments of this application provide a notification display methodand a terminal, used to achieve accurate classification of notificationsto meet requirements of users, to help the users to screen outnotifications of interest, thereby improving user experience.

A first aspect of the embodiments of this application provides anotification display method, and the method includes:

when there is a to-be-notified event, obtaining, by the terminal,matching information from object information of the to-be-notifiedevent; matching the matching information against a rule in a rulerepository; if the matching succeeds, displaying a notificationcorresponding to the to-be-notified event by classification based on anotification type corresponding to the matching rule; or if the matchingfails, extracting at least one piece of feature information from theobject information of the to-be-notified event, analyzing the featureinformation by using a classification model, and displaying anotification corresponding to the to-be-notified event by classificationbased on a notification type obtained by an analysis.

Each rule in the rule repository includes at least one condition, andeach rule corresponds to one notification type. The object informationof the to-be-notified event includes at least text information, jumpinformation, and application package name information corresponding tothe to-be-notified event.

In one embodiment, when there is a to-be-notified event, the terminalextracts the matching information or the feature information of theto-be-notified event, and matches the matching information against therule in the rule repository, to obtain the notification type, oranalyzes the feature information by using the classification model, toobtain the notification type. The rules in the rule repository and theclassification model are determined based on a large amount of sampledata that is manually labeled with the notification types, so thataccurate classification of notifications may be achieved to meetrequirements of users, to help the users to screen out notifications ofinterest, thereby improving user experience.

In one embodiment, the matching information obtained by the terminalfrom the object information of the to-be-notified event is the textinformation, and the rule in the rule repository includes at least onetext matching condition. After obtaining the text information, theterminal matches the text information against a text matching conditionin the rule.

This embodiment provides a specific manner of matching the matchinginformation against the rule, to improve the feasibility of thesolution.

In one embodiment, the matching information obtained by the terminalfrom the object information of the to-be-notified event is the textinformation and the application package name information, and the rulein the rule repository includes at least one text matching condition andan application package name matching condition corresponding to eachtext matching condition. After obtaining the text information and theapplication package name information, the terminal matches the textinformation against a text matching condition in the rule, and matchesthe application package name information against a correspondingapplication package name matching condition.

This embodiment provides another specific manner of matching thematching information against the rule, to improve the flexibility of thesolution.

In one embodiment, the matching information obtained by the terminalfrom the object information of the to-be-notified event is the jumpinformation and the application package name information, and the rulein the rule repository includes at least one jump matching condition andan application package name matching condition corresponding to eachjump matching condition. After obtaining the jump information and theapplication package name information, the terminal matches the jumpinformation against a jump matching condition in the rule, and matchesthe application package name information against a correspondingapplication package name matching condition.

This embodiment provides another specific manner of matching thematching information against the rule, to improve the flexibility of thesolution.

In one embodiment, the jump information includes standard jumpinformation and self-defined jump information.

According to this embodiment, the terminal may not only match thestandard jump information, but also match the self-defined jumpinformation, to improve accuracy of classification.

In one embodiment, the classification model may include: a textclassification model, a jump classification model, and a fusionclassification model. The terminal extracts a jump informationeigenvector and a text information eigenvector from the objectinformation of the to-be-notified event, analyzes the text informationeigenvector by using the text classification model, to obtain a firstcategory, analyzes the jump information eigenvector by using the jumpclassification model, to obtain a second category, and analyzes thefirst category and the second category by using the fusionclassification model, to obtain an analysis result. The analysis resultcorresponds to one notification type.

According to this embodiment, the text information and the jumpinformation of the to-be-notified event are separately analyzed by usingthe classification model, and a final notification type is obtainedbased on an analysis result of the two, thereby improving accuracy ofthe solution.

In one embodiment, the terminal may extract the jump informationeigenvector in the following manner: obtaining, by the terminal, thejump information from the object information, dividing a value of eachfield in the jump information into a plurality of characters, andcombining the plurality of characters through vectorization, to obtainthe jump information eigenvector. Similarly, the terminal may extractthe text information eigenvector in the following manner: obtaining, bythe terminal, the text information from the object information, dividingthe text information into a plurality of words and/or phrases, andcombining the plurality of words and/or phrases through vectorization,to obtain the text information eigenvector.

This embodiment provides a specific manner of extracting theeigenvector, to improve the feasibility of the solution.

In one embodiment, the terminal may display the notification byclassification in the following manner: displaying, by the terminal, anotification corresponding to to-be-notified events of a samenotification type in a same display pane in a centralized manner, thatis, displaying a notification in a display pane corresponding to anotification type to which the notification belongs.

In one embodiment, the terminal displays a notification of anotification type in a same display pane in a centralized manner in thefollowing manner: the terminal displays the notification in expandedform in the display pane.

This embodiment provides a specific manner of displaying thenotification by classification, to improve the feasibility of thesolution.

In one embodiment, the terminal displays a notification of anotification type in a same display pane in a centralized manner in thefollowing manner: determining, by the terminal, a display mode of thenotification in the display pane based on a priority of the obtainednotification, and display the notification in the display pane in acorresponding display mode. The display mode includes: displaying inexpanded form or displaying in collapsed form. Alternatively, thedisplay mode includes: displaying in a first mode or displaying in asecond mode, and content displayed in the first mode is more thancontent displayed in the second mode.

This embodiment provides another specific manner of displaying thenotification by classification, to improve the flexibility of thesolution.

It should be noted that, the displaying in expanded form refers topartially or completely displaying text information of a notification inexpanded form, and the displaying in collapsed form refers to hiding ordisplaying only part of text information of a notification.

With reference to the ninth implementation of the first aspect in thisapplication, in a tenth implementation of the first aspect in thisapplication, when the terminal displays a notification in the secondmode, displaying, by the terminal, the notification in the first mode inresponse to detecting an input operation performed on the displayednotification.

This embodiment provides another specific manner of displaying thenotification by classification, to improve the flexibility of thesolution.

In one embodiment, the terminal may obtain a priority of thenotification in the following manner: obtaining, by the terminal,priority information corresponding to the notification, and determiningthe priority corresponding to the notification based on the priorityinformation, where the priority information includes at least one of thefollowing: first priority information corresponding to the notificationtype to which the notification belongs, second priority information ofan application corresponding to the notification, and user usage habitinformation corresponding to the notification.

According to this embodiment, the priorities of the notifications may bedetermined based on information such as the notification type, theattribute of an application, or a user habit, and the notifications maybe classified, so that the requirements of the users may be better met,thereby improving user experience.

In one embodiment, the user usage habit information includes at leastone of the following: user historical notification tapping frequencyinformation, user historical notification deletion frequencyinformation, and user profile information.

According to this embodiment, the user usage habit may be determinedbased on a plurality of pieces of information, to improve accuracy ofthe solution.

A second aspect of the embodiments of this application provides anotification display method, and the method includes: when there is ato-be-notified event, obtaining, by the terminal, text information, jumpinformation and application package name information that are of theto-be-notified event; then matching the text information against ageneral rule in a rule repository; if the text information successfullymatches against a first general rule, using a notification typecorresponding to the first general rule as a notification type of anotification corresponding to the to-be-notified event; if the textinformation does not match any general rule in the rule repository,matching the text information and the application package nameinformation against a special rule in the rule repository, and if thetext information and the application package name information matchagainst a first special rule, using a notification type corresponding tothe first special rule as a notification type of a notificationcorresponding to the to-be-notified event; if the text information andthe application package name information does not match any special rulein the rule repository, matching the jump information and theapplication package name information against an exact match rule in therule repository, and if the jump information and the application packagename information match against a first exact match rule, using anotification type corresponding to the first exact match rule as anotification type of a notification corresponding to the to-be-notifiedevent; if the jump information and the application package nameinformation does not match any exact match rules in the rule repository,matching the jump information and the application package nameinformation against a fuzzy match rule in the rule repository, and ifthe jump information and the application package name informationsuccessfully match against a first fuzzy match rule, using anotification type corresponding to the first fuzzy match rule as anotification type of a notification corresponding to the to-be-notifiedevent; and if the jump information and the application package nameinformation does not match any fuzzy match rule in the rule repository,extracting a jump information eigenvector from the jump information,extracting a text information eigenvector from the text information,analyzing the text information eigenvector by using a textclassification model, to obtain a first category, analyzing the jumpinformation eigenvector by using the jump classification model, toobtain a second category, and analyzing the first category and thesecond category by using a fusion classification mode, to obtain anotification type of a notification.

After determining the notification type, the terminal displays thenotification by classification based on the notification type. Thedisplaying may specifically be in any one of the following manners:displaying a notification of a same notification type in expanded formin one display pane in a centralized manner; centralizing a notificationof a same notification type in one display pane, and displaying anotification that has a high priority in expanded form, and displaying anotification that has a low priority in collapsed form; and centralizinga notification that is of a same notification type and that has a highpriority in one display pane and displaying in expanded form, anddisplaying all notifications that have low priorities in collapsed form.

The priority of the notification is determined based on priorityinformation of the notification type, priority information of anapplication, or a user usage habit.

In one embodiment, when there is a to-be-notified event, the terminalextracts the matching information or the feature information of theto-be-notified event, and matches the matching information against therule in the rule repository, to obtain the notification type, oranalyzes the feature information by using the classification model, toobtain the notification type. The rules in the rule repository and theclassification model are determined based on a large amount of sampledata that is manually labeled with the notification types, so thataccurate classification of notifications may be achieved to meetrequirements of users, to help the users to screen out notifications ofinterest, thereby improving user experience.

A third aspect of the embodiments of this application provides anotification display method, and the method includes: when there is ato-be-notified event, displaying, by the terminal, a notification byclassification based on a notification type of the notification. Inaddition, because notifications have different priorities, display modescorresponding to the notifications are different. Specifically, thedifferent display modes may include the following two display modes:displaying in expanded form and displaying in collapsed form.Alternatively, the different display modes include the following twodisplay modes: displaying in a first mode and displaying in a secondmode, and content displayed in the first mode is more than contentdisplayed in the second mode.

In this embodiment, the terminal may display the notification indifferent modes based on the priority of the notification. Less contentmay be displayed for the notification that has a relatively lowpriority, and more content may be displayed for the notification thathas a high priority. In this case, the user may be allowed to quicklyfind out notifications of interest on the notification displayinterface, thereby improving search efficiency and improving userexperience.

In one embodiment, the terminal may specifically display thenotification by classification in the following manner: displaying, bythe terminal, a notification corresponding to a to-be-notified event ofa same notification type in a same display pane in a centralized manner,that is, displaying the notification of a same notification type in onedisplay pane in a centralized manner.

In one embodiment, a manner in which the terminal displays thenotification in a same display pane in a centralized manner mayspecifically be displaying the notification in expanded form, that is,displaying the notification of a same notification type in expanded formin one display pane.

It should be noted that, the displaying in expanded form refers topartially or completely displaying text information of a notification inexpanded form.

This embodiment provides a specific manner of displaying byclassification, to improve the feasibility of the solution.

In one embodiment, a manner in which the terminal displays thenotification in a same display pane in a centralized manner mayspecifically be determining a display mode of the notification in acorresponding display pane based on the priority of the notificationcorresponding to the to-be-notified event, and displaying thenotification based on the determined display mode. The display mode mayinclude: displaying in expanded form or displaying in collapsed form, ormay include: displaying in a first mode or displaying in a second mode,and content displayed in the first mode is more than content displayedin the second mode.

It should be noted that, the displaying in expanded form refers topartially or completely displaying text information of a notification inexpanded form, and the displaying in collapsed form refers to hiding ordisplaying part of content of text information of a notification.

In one embodiment, when the terminal displays a notification in thesecond mode, displaying, by the terminal, the notification in the firstmode in response to detecting an input operation performed on thedisplayed notification.

This embodiment provides another specific manner of displaying thenotification by classification, to improve the flexibility of thesolution.

In one embodiment, the terminal may determine the priority correspondingto the notification based on the obtained priority information. Thepriority information includes at least one of the following: firstpriority information corresponding to the notification type to which thenotification belongs, second priority information of an applicationcorresponding to the notification, and user usage habit informationcorresponding to the notification.

According to this embodiment, the priorities of the notifications may bedetermined based on information such as the notification type, theattribute of an application, or a user habit, and the notifications maybe classified, so that the requirements of the users may be better met,thereby improving user experience.

In one embodiment, the user usage habit information includes at leastone of the following: user historical notification tapping frequencyinformation, user historical notification deletion frequencyinformation, and user profile information.

According to this embodiment, the user usage habit may be determinedbased on a plurality of pieces of information, to improve accuracy ofthe solution.

A fourth aspect of this application provides a notification displaymethod, and the method includes: displaying, by the terminal, anotification corresponding to a to-be-notified event of a samenotification type in expanded form in a same display pane in acentralized manner, or displaying in different modes based on a priorityof a notification. The different modes may specifically be displaying inexpanded form or displaying in collapsed form, and the different modesmay further specifically be displaying in a first mode or displaying ina second mode, and content displayed in the first mode is more thancontent displayed in the second mode. The priority of the notificationmay be determined based on priority information. The priorityinformation includes at least one of the following: first priorityinformation corresponding to the notification type to which thenotification belongs, second priority information of an applicationcorresponding to the notification, and user usage habit informationcorresponding to the notification.

In this embodiment, the terminal may display the notification indifferent modes based on the priority of the notification. Less contentmay be displayed for the notification that has a relatively lowpriority, and more content may be displayed for the notification thathas a high priority. In this case, the user may be allowed to quicklyfind out notifications of interest on the notification displayinterface, thereby improving search efficiency and improving userexperience.

A fifth aspect of the embodiments of this application provides aterminal, and the terminal includes: a touchscreen, one or moreprocessors, a memory, a plurality of application programs, and one ormore computer programs. The touchscreen includes a touch-sensitivesurface and a display, the one or more computer programs are stored inthe memory, the one or more computer programs include an instruction,and when the instruction is executed by the terminal, the terminal isenabled to perform the following operations:

when there is a to-be-notified event, obtaining matching informationfrom object information of the to-be-notified event; matching thematching information against a rule in a rule repository; if thematching succeeds, displaying a notification corresponding to theto-be-notified event by classification based on a notification typecorresponding to the matching rule; or if the matching fails, extractingat least one piece of feature information from the object information ofthe to-be-notified event, analyzing the feature information by using aclassification model, and displaying a notification corresponding to theto-be-notified event by classification based on a notification typeobtained by an analysis.

Each rule in the rule repository includes at least one condition, andeach rule corresponds to one notification type. The object informationof the to-be-notified event includes at least text information, jumpinformation, and application package name information corresponding tothe to-be-notified event.

In one embodiment, the rule in the rule repository includes at least onetext matching condition. In a process of obtaining, by the terminal,matching information from object information of the to-be-notified eventand matching the matching information against a rule in a rulerepository, when the processor executes the instruction, the terminal isenabled to specifically perform the following operations:

obtaining the text information from the object information of theto-be-notified event, and matching the text information against a firsttext matching condition in the rule.

This embodiment provides a specific manner of matching the matchinginformation against the rule, to improve the feasibility of thesolution.

In one embodiment, the rule in the rule repository includes the at leastone text matching condition and an application package name matchingcondition corresponding to each text matching condition.

In a process of obtaining, by the terminal, matching information fromobject information of the to-be-notified event and matching the matchinginformation against a rule in a rule repository, when the processorexecutes the instruction, the terminal is enabled to specificallyperform the following operations:

obtaining the text information and the application package nameinformation from the object information of the to-be-notified event,matching the text information against a text matching condition in therule, and matching the application package name information against anapplication package name matching condition corresponding to the textmatching condition in the rule.

This embodiment provides another specific manner of matching thematching information against the rule, to improve the flexibility of thesolution.

In one embodiment, the rule in the rule repository includes at least onejump matching condition and an application package name matchingcondition corresponding to each jump matching condition.

In a process of obtaining, by the terminal, matching information fromobject information of the to-be-notified event and matching the matchinginformation against a rule in a rule repository, when the processorexecutes the instruction, the terminal is enabled to specificallyperform the following operations:

obtaining the jump information and the application package nameinformation from the object information of the to-be-notified event,matching the jump information against a jump matching condition in therule, and matching the application package name information against anapplication package name matching condition corresponding to the jumpmatching condition in the rule.

This embodiment provides another specific manner of matching thematching information against the rule, to improve the flexibility of thesolution.

In one embodiment, the jump information includes standard jumpinformation and self-defined jump information.

According to this embodiment, the terminal may not only match thestandard jump information, but also match the self-defined jumpinformation, to improve accuracy of classification.

In one embodiment, the classification model may include: a textclassification model, a jump classification model, and a fusionclassification model.

In a process of extracting, by the terminal, at least one piece offeature information from the object information of the to-be-notifiedevent and analyzing the feature information by using a classificationmodel, when the processor executes the instruction, the terminal isenabled to specifically perform the following operations:

extracting a jump information eigenvector and a text informationeigenvector from the object information of the to-be-notified event,analyzing the text information eigenvector by using the textclassification model, to obtain a first category, analyzing the jumpinformation eigenvector by using the jump classification model, toobtain a second category, and analyzing the first category and thesecond category by using the fusion classification model, to obtain ananalysis result. The analysis result corresponds to one notificationtype.

According to this embodiment, the text information and the jumpinformation of the to-be-notified event are separately analyzed by usingthe classification model, and a final notification type is obtainedbased on an analysis result of the two, thereby improving accuracy ofthe solution.

In one embodiment, in a process of extracting, by the terminal, a jumpinformation eigenvector and a text information eigenvector from theobject information of the to-be-notified event, when the processorexecutes the instruction, the terminal is enabled to specificallyperform the following operations:

obtaining the jump information from the object information, dividing avalue of each field in the jump information into a plurality ofcharacters, and combining several of characters through vectorization,to obtain the jump information eigenvector; obtaining the textinformation from the object information, dividing the text informationinto a plurality of words and/or phrases, and combining the plurality ofwords and/or phrases through vectorization, to obtain the textinformation eigenvector.

This embodiment provides a specific manner of extracting theeigenvector, to improve the feasibility of the solution.

In one embodiment, in a process of displaying by classification by theterminal, when the processor executes the instruction, the terminal isenabled to specifically perform the following operations:

displaying a notification corresponding to a to-be-notified event of asame notification type in a same display pane in a centralized manner,that is, displaying a notification in a display pane corresponding to anotification type to which the notification belongs.

With reference to the seventh implementation of the fifth aspect in thisapplication, in an eighth implementation of the fifth aspect in thisapplication, in a process of displaying by classification by theterminal, when the processor executes the instruction, the terminal isenabled to specifically perform the following operations:

displaying a notification of a notification type in expanded form in onedisplay pane in a centralized manner.

This embodiment provides a specific manner of displaying thenotification by classification, to improve the feasibility of thesolution.

In one embodiment, in a process of displaying by classification by theterminal, when the processor executes the instruction, the terminal isenabled to specifically perform the following operations:

displaying a notification of a notification type in one display pane ina centralized manner, determining a display mode of the notification inthe display pane based on a priority of the obtained notification, anddisplaying the notification in the display pane in corresponding displaymode. The display mode includes: displaying in expanded form ordisplaying in collapsed form. Alternatively, the display mode includes:displaying in a first mode or displaying in a second mode, and contentdisplayed in the first mode is more than content displayed in the secondmode.

This embodiment provides another specific manner of displaying thenotification by classification, to improve the flexibility of thesolution.

It should be noted that, the displaying in expanded form refers topartially or completely displaying text information of a notification,and the displaying in collapsed form refers to hiding or displaying onlypart of text information of a notification.

In one embodiment, when displaying, by the terminal, a notification inthe second mode, the processor executes the instruction, and theterminal is enabled to further perform the following operations:

displaying the notification in the first mode in response to detectingan input operation performed on the displayed notification.

This embodiment provides another specific manner of displaying thenotification by classification, to improve the flexibility of thesolution.

In one embodiment, in a process of displaying by classification by theterminal, when the processor executes the instruction, the terminal isenabled to specifically perform the following operations:

obtaining priority information corresponding to the notification, anddetermining the priority corresponding to the notification based on thepriority information. The priority information includes at least one ofthe following: first priority information corresponding to thenotification type to which the notification belongs, second priorityinformation of an application corresponding to the notification, anduser usage habit information corresponding to the notification.

According to this embodiment, the priorities of the notifications may bedetermined based on information such as the notification type, theattribute of an application, or a user habit, and the notifications maybe classified, so that the requirements of the users may be better met,thereby improving user experience.

In one embodiment, the user usage habit information includes at leastone of the following: user historical notification tapping frequencyinformation, user historical notification deletion frequencyinformation, and user profile information.

According to this embodiment, the user usage habit may be determinedbased on a plurality of pieces of information, to improve accuracy ofthe solution.

A sixth aspect of this application provides a terminal, and the terminalincludes: a touchscreen, one or more processors, a memory, a pluralityof application programs, and one or more computer programs. Thetouchscreen includes a touch-sensitive surface and a display, the one ormore computer programs are stored in the memory, the one or morecomputer programs include an instruction, and when the instruction isexecuted by the terminal, the terminal is enabled to perform thefollowing operations:

when there is a to-be-notified event, displaying a notification byclassification based on a notification type of the notification. Inaddition, because priorities of notifications are different, displaymodes corresponding to the notifications are different. Specifically,the different display modes may include the following two display modes:displaying in expanded form and displaying in collapsed form.Alternatively, the different display modes include the following twodisplay modes: displaying in a first mode and displaying in a secondmode, and content displayed in the first mode is more than contentdisplayed in the second mode.

In this embodiment, the terminal may display the notification indifferent modes based on the priority of the notification. Less contentmay be displayed for the notification that has a relatively lowpriority, and more content may be displayed for the notification thathas a high priority. In this case, the user may be allowed to quicklyfind out notifications of interest on the notification displayinterface, thereby improving search efficiency and improving userexperience.

In one embodiment, in a process of displaying by classification by theterminal, when the processor executes the instruction, the terminal isenabled to specifically perform the following operations:

displaying a notification corresponding to a to-be-notified event of asame notification type in a same display pane in a centralized manner,that is, centralizing the notification of a same notification type inone display pane.

In one embodiment, in a process of displaying by classification by theterminal, when the processor executes the instruction, the terminal isenabled to specifically perform the following operation:

displaying, by the terminal, a notification in expanded form in a samedisplay pane in a centralized manner.

It should be noted that, the displaying in expanded form refers topartially or completely displaying text information of a notification inexpanded form.

This embodiment provides a specific manner of displaying byclassification, to improve the feasibility of the solution.

In one embodiment, in a process of displaying by classification by theterminal, when the processor executes the instruction, the terminal isenabled to specifically perform the following operations:

a manner in which the notification is displayed in a same display panein a centralized manner may specifically be determining a display modeof the notification in a corresponding display pane based on thepriority of the notification corresponding to the to-be-notified event,and displaying the notification based on the determined display mode.The display mode may include: displaying in expanded form or displayingin collapsed form, or may include: displaying in a first mode ordisplaying in a second mode, and content displayed in the first mode ismore than content displayed in the second mode.

It should be noted that, the displaying in expanded form refers topartially or completely displaying text information of a notification inexpanded form, and the displaying in collapsed form refers to hiding ordisplaying part of content of text information of a notification.

In one embodiment, when displaying, by the terminal, a notification inthe second mode, the processor executes the instruction, and theterminal is enabled to further perform the following operations:

displaying the notification in the first mode in response to detectingan input operation performed on the displayed notification.

This embodiment provides another specific manner of displaying thenotification by classification, to improve the flexibility of thesolution.

In one embodiment, the processor executes the instruction, and theterminal is enabled to further perform the following operations:

determining the priority corresponding to the notification based on theobtained priority information. The priority information includes atleast one of the following: first priority information corresponding tothe notification type to which the notification belongs, second priorityinformation of an application corresponding to the notification, anduser usage habit information corresponding to the notification.

According to this embodiment, the priorities of the notifications may bedetermined based on information such as the notification type, theattribute of an application, or a user habit, and the notifications maybe classified, so that the requirements of the users may be better met,thereby improving user experience.

In one embodiment, the user usage habit information includes at leastone of the following: user historical notification tapping frequencyinformation, user historical notification deletion frequencyinformation, and user profile information.

According to this embodiment, the user usage habit may be determinedbased on a plurality of pieces of information, to improve accuracy ofthe solution.

A seventh aspect of this application provides a terminal, and theterminal includes: a matching module, a display module, and an analysismodule.

When there is a to-be-notified event, the matching module is configuredto: obtain matching information from object information of theto-be-notified event, and match the matching information against atleast one rule in a rule repository. The display module is configured todisplay, if the matching performed by the matching module succeeds, anotification corresponding to the to-be-notified event by classificationbased on a notification type corresponding to the matching rule. Theanalysis module is configured to: extract, if the matching performed bythe matching module fails, at least one piece of feature informationfrom the object information of the to-be-notified event, and analyze thefeature information by using a classification model. The display moduleis alternatively configured to display a notification corresponding tothe to-be-notified event by classification based on a notification typeobtained by an analysis by the analysis module.

Each rule in the rule repository includes at least one condition, andeach rule corresponds to one notification type. The object informationof the to-be-notified event includes at least text information, jumpinformation, and application package name information corresponding tothe to-be-notified event.

In one embodiment, when there is a to-be-notified event, the matchingmodule may match the matching information against the rules in the rulerepository, to obtain the notification type; the analysis module mayanalyze the feature information by using the classification model, toobtain the notification type; and the display module may display thenotification by classification based on the notification type. The rulesin the rule repository and the classification model are determined basedon a large amount of sample data based on a large amount of sample datathat is manually labeled with the notification types, so that accurateclassification of notifications may be achieved to meet requirements ofusers, to help the users to screen out notifications of interest,thereby improving user experience.

In one embodiment, the rule in the rule repository includes at least onetext matching condition. The matching module is specifically configuredto: obtain the text information from the object information of theto-be-notified event, and match the text information against a textmatching condition in the rule.

This embodiment provides a specific manner of matching the matchinginformation against the rule, to improve the feasibility of thesolution.

In one embodiment, the rule in the rule repository includes the at leastone text matching condition and an application package name matchingcondition corresponding to each text matching condition.

The matching module is specifically configured to: obtain the textinformation and the application package name information from the objectinformation of the to-be-notified event, match the text informationagainst a text matching condition in the rule, and match the applicationpackage name information against an application package name matchingcondition corresponding to the text matching condition in the rule.

This embodiment provides another specific manner of matching thematching information against the rule, to improve the flexibility of thesolution.

In one embodiment, the rule in the rule repository includes at least onejump matching condition and an application package name matchingcondition corresponding to each jump matching condition.

The matching module is specifically configured to: obtain the jumpinformation and the application package name information from the objectinformation of the to-be-notified event, match the jump informationagainst a jump matching condition in the rule, and match the applicationpackage name information against a corresponding application packagename matching condition.

This embodiment provides another specific manner of matching thematching information against the rule, to improve the flexibility of thesolution.

In one embodiment, the jump information includes standard jumpinformation and self-defined jump information.

According to this embodiment, the terminal may not only match thestandard jump information, but also match the self-defined jumpinformation, to improve accuracy of classification.

In one embodiment, the classification model may include: a textclassification model, a jump classification model, and a fusionclassification model.

The analysis module is specifically configured to: extract a jumpinformation eigenvector and a text information eigenvector from theobject information of the to-be-notified event, analyze the textinformation eigenvector by using the text classification model, toobtain a first category, analyze the jump information eigenvector byusing the jump classification model, to obtain a second category, andanalyze the first category and the second category by using the fusionclassification model, to obtain an analysis result. The analysis resultcorresponds to one notification type.

According to this embodiment, the text information and the jumpinformation of the to-be-notified event are separately analyzed by usingthe classification model, and a final notification type is obtainedbased on an analysis result of the two, thereby improving accuracy ofthe solution.

In one embodiment, the classification model is specifically configuredto: obtain the jump information from the object information, divide avalue of each field in the jump information into a plurality ofcharacters, and combine the plurality of characters throughvectorization, to obtain the jump information eigenvector.

The analysis module is further specifically configured to: obtain thetext information from the object information, divide the textinformation into a plurality of words and/or phrases, and combine theplurality of words and/or phrases through vectorization, to obtain thetext information eigenvector.

This embodiment provides a specific manner of extracting theeigenvector, to improve the feasibility of the solution.

In one embodiment, the display module is specifically configured todisplay a notification corresponding to a to-be-notified event of a samenotification type in a same display pane in a centralized manner, thatis, display a notification in a display pane corresponding to anotification type to which the notification belongs.

In one embodiment, the display module is specifically configured todisplay a notification of a notification type in expanded form in onedisplay pane in a centralized manner.

This embodiment provides a specific manner of displaying thenotification by classification, to improve the feasibility of thesolution.

In one embodiment, the display module is specifically configured to:display a notification of a notification type in one display pane in acentralized manner, determine a display mode of the notification in thedisplay pane based on a priority of the obtained notification, anddisplay the notification in the display pane in corresponding displaymode. The display mode includes: displaying in expanded form ordisplaying in collapsed form. Alternatively, the display mode includes:displaying in a first mode or displaying in a second mode, and contentdisplayed in the first mode is more than content displayed in the secondmode.

This embodiment provides another specific manner of displaying thenotification by classification, to improve the flexibility of thesolution.

It should be noted that, the displaying in expanded form refers topartially or completely displaying text information of a notification inexpanded form, and the displaying in collapsed form refers to hiding ordisplaying only part of text information of a notification.

In one embodiment, when the display module is configured to display thenotification in the second mode, the display module may be furtherconfigured to display the notification in the first mode in response toa detected input operation performed on the displayed notification.

This embodiment provides another specific manner of displaying thenotification by classification, to improve the flexibility of thesolution.

In one embodiment, the terminal further includes a determining module.The determining module is configured to obtain priority informationcorresponding to the notification, and determine the prioritycorresponding to the notification based on the priority information. Thepriority information includes at least one of the following: firstpriority information corresponding to the notification type to which thenotification belongs, second priority information of an applicationcorresponding to the notification, and user usage habit informationcorresponding to the notification.

According to this embodiment, the priorities of the notifications may bedetermined based on information such as the notification type, theattribute of an application, or a user habit, and the notifications maybe classified, so that the requirements of the users may be better met,thereby improving user experience.

In one embodiment, the user usage habit information includes at leastone of the following: user historical notification tapping frequencyinformation, user historical notification deletion frequencyinformation, and user profile information.

According to this embodiment, the user usage habit may be determinedbased on a plurality of pieces of information, to improve accuracy ofthe solution.

An eighth aspect of this application provides a terminal, and theterminal includes a display module.

The display module id configured to display, when there is ato-be-notified event, a notification by classification based on anotification type of the notification, and display in different displaymodes based on a priority of the notification. Specifically, thedifferent display modes may include the following two display modes:displaying in expanded form and displaying in collapsed form.Alternatively, the different display modes include the following twodisplay modes: displaying in a first mode and displaying in a secondmode, and content displayed in the first mode is more than contentdisplayed in the second mode.

In this embodiment, the display module may display the notification indifferent modes based on the priority of the notification. Less contentmay be displayed for the notification that has a relatively lowpriority, and more content may be displayed for the notification thathas a high priority. In this case, the user may be allowed to quicklyfind out notifications of interest on the notification displayinterface, thereby improving search efficiency and improving userexperience.

In one embodiment, the display module is configured to display anotification corresponding to a to-be-notified event of a samenotification type in a same display pane in a centralized manner, thatis, centralize the notification of a same notification type in onedisplay pane.

In one embodiment, the display module is configured to display thenotifications in expanded form in a same display pane, that is, displaythe notifications of a same notification type in expanded form in onedisplay pane.

It should be noted that, the displaying in expanded form refers topartially or completely displaying text information of a notification inexpanded form.

This embodiment provides a specific manner of displaying byclassification, to improve the feasibility of the solution.

In one embodiment, the display module is configured to centralize thenotification in a same display pane, determine a display mode of thenotification in a corresponding display pane based on the priority ofthe notification corresponding to the to-be-notified event, and displaythe notification based on the determined display mode. The display modemay include: displaying in expanded form or displaying in collapsedform, or may include: displaying in a first mode or displaying in asecond mode, and content displayed in the first mode is more thancontent displayed in the second mode.

It should be noted that, the displaying in expanded form refers topartially or completely displaying text information of a notification inexpanded form, and the displaying in collapsed form refers to hiding ordisplaying part of content of text information of a notification.

In one embodiment, when the display module is configured to display thenotification in the second mode, the display module is furtherconfigured to display the notification in the first mode in response toa detected input operation performed on the displayed notification.

This embodiment provides another specific manner of displaying thenotification by classification, to improve the flexibility of thesolution.

In one embodiment, the terminal further includes an obtaining module,configured to determine the priority corresponding to the notificationbased on the obtained priority information. The priority informationincludes at least one of the following: first priority informationcorresponding to the notification type to which the notificationbelongs, second priority information of an application corresponding tothe notification, and user usage habit information corresponding to thenotification.

According to this embodiment, the priorities of the notifications may bedetermined based on information such as the notification type, theattribute of an application, or a user habit, and the notifications maybe classified, so that the requirements of the users may be better met,thereby improving user experience.

In one embodiment, the user usage habit information includes at leastone of the following: user historical notification tapping frequencyinformation, user historical notification deletion frequencyinformation, and user profile information.

According to this embodiment, the user usage habit may be determinedbased on a plurality of pieces of information, to improve accuracy ofthe solution.

A ninth aspect of this application provides a graphical user interface(GUI), and the graphical user interface is stored in a terminal, theterminal includes a touchscreen, a memory, one or more processors, andthe one or more processors are configured to execute one or morecomputer programs stored in the memory, where when there is ato-be-notified event, the graphical user interface includes:

a first GUI displayed on the touchscreen, where the first GUI includes anotification corresponding to the to-be-notified event, the notificationis displayed by classification on the first GUI based on a notificationtype of the notification, and the notification is displayed in differentdisplay modes based on a priority of the notification, where thedifferent display modes include: displaying in expanded form ordisplaying in collapsed form in the corresponding display pane, or thedifferent display modes include: displaying in a first mode ordisplaying in a second mode in the corresponding display pane, andcontent displayed in the first mode is more than content displayed inthe second mode.

In one embodiment, the first GUI further includes at least one displaypane, and the display pane is configured to centralize notificationscorresponding to to-be-notified events of the same notification type, asshown in the following FIG. 9A to FIG. 9I.

In one embodiment, the displaying by classification includes: displayingthe notification in expanded form in a corresponding display pane, asshown in FIG. 9A.

In one embodiment, the displaying by classification includes:determining a display mode of the notification in a correspondingdisplay pane based on the priority of the notification corresponding tothe to-be-notified event, and displaying the notification based on thedetermined display mode, as shown in FIG. 9B to FIG. 9F.

The display mode includes: displaying in expanded form or displaying incollapsed form in the corresponding display pane.

Alternatively, the display mode includes: displaying in the first modeor displaying in the second mode in the corresponding display pane, andthe content displayed in the first mode is more than the contentdisplayed in the second mode.

In one embodiment, the displaying by classification includes: displayingin the first mode or displaying in the second mode in the correspondingdisplay pane, and the content displayed in the first mode is more thanthe content displayed in the second mode.

The displaying by classification further includes:

when the notification is displayed in the second mode, displaying, bythe terminal, the notification in the first mode in response todetecting an input operation performed on the displayed notification, asshown in FIG. 9C-1 and FIG. 9C-2.

In one embodiment, the priority of the notification is determined basedon the priority information, where

the priority information includes at least one of the following:

first priority information corresponding to the notification typecorresponding to the notification;

second priority information of an application corresponding to thenotification; and

user usage habit information corresponding to the notification.

In one embodiment, the user usage habit information includes at leastany one of the following:

user historical notification tapping frequency information;

user historical notification deletion frequency information; and

user profile information.

A tenth aspect of this application provides a computer-readable storagemedium, including an instruction. When the instruction is run on acomputer, the computer is enabled to perform the method according to anyone of the first aspect, the first to the twelfth implementations of thefirst aspect, and the second aspect.

An eleventh aspect of this application provides a computer-readablestorage medium, including an instruction. When the instruction is run ona computer, the computer is enabled to perform the method according toany one of the second aspect, the first to the sixth implementations ofthe second aspect, and the third aspect.

A twelfth aspect of this application provides a computer programproduct. When the computer program product is run on a computer, thecomputer is enabled to perform the method according to any one of thefirst aspect, the first to the twelfth implementations of the firstaspect, and the second aspect.

A thirteenth aspect of this application provides a computer programproduct. When the computer program product is run on a computer, thecomputer is enabled to perform the method according to any one of thesecond aspect, the first to the sixth implementations of the secondaspect, and the third aspect.

The technical solutions provided in this embodiment of this applicationhave the following beneficial effects.

In the embodiments of this application, when there is a to-be-notifiedevent, the terminal extracts the matching information or the featureinformation of the to-be-notified event, and matches the matchinginformation against the rule in the rule repository, to obtain thenotification type, or analyzes the feature information by using theclassification model, to obtain the notification type. The rules in therule repository and the classification model are determined based on alarge amount of sample data that is manually labeled with thenotification types, so that accurate classification of notifications maybe achieved to meet requirements of users, to help the users to screenout notifications of interest, thereby improving user experience.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1A is a schematic structural diagram of a terminal according to anembodiment of this application;

FIG. 1B is a schematic diagram of a display pane according to anembodiment of this application;

FIG. 1C is another schematic diagram of a display pane according to anembodiment of this application;

FIG. 2A is a schematic diagram of notifications displayed by a terminalon a lock screen interface;

FIG. 2B is another schematic diagram of notifications displayed by aterminal on a current interface;

FIG. 2C-1 and FIG. 2C-2 are schematic diagrams of notificationsdisplayed by a terminal on a notification bar display interface;

FIG. 2D-1 and FIG. 2D-2 are schematic diagrams of notificationsdisplayed by a terminal on a notification bar display interface;

FIG. 3 is a schematic structural diagram of a system to which anotification display method is applied according to an embodiment ofthis application;

FIG. 4 is a flowchart of an embodiment of a notification display methodaccording to an embodiment of this application;

FIG. 5A is a schematic diagram of a jump rule according to an embodimentof this application;

FIG. 5B is a schematic diagram of object information of a notificationaccording to an embodiment of this application;

FIG. 6 is a flowchart of matching a notification type against a rule ina rule repository according to an embodiment of this application;

FIG. 7 is a flowchart of an embodiment of generating a classificationmodel by a server according to an embodiment of this application;

FIG. 8 is a flowchart of an embodiment of updating a classificationmodel by a server according to an embodiment of this application;

FIG. 9A is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 9B is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 9C-1 and FIG. 9C-2 are schematic diagrams of notificationsdisplayed on a notification bar display interface according to anembodiment of this application;

FIG. 9D is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 9E is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 9F is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 9G-1, FIG. 9G-2, and FIG. 9G-3 are schematic diagrams of settinguser habit information by a user according to an embodiment of thisapplication;

FIG. 9H is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 9I is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 10A is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 10B-1 and FIG. 10B-2 are schematic diagrams of notificationsdisplayed on a notification bar display interface according to anembodiment of this application;

FIG. 10C is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 10D is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 10E is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 10F is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 10G is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 11A-1, FIG. 11A-2, FIG. 11A-3, and FIG. 11A-4 are schematicdiagrams of an operation of starting smart classification by a useraccording to an embodiment of this application;

FIG. 11B-1 and FIG. 11B-2 are schematic diagrams of an operation ofsetting a display mode corresponding to a notification type by a useraccording to an embodiment of this application;

FIG. 12A is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 12B is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 12C-1 and FIG. 12C-2 are schematic diagrams of notificationsdisplayed on a notification bar display interface according to anembodiment of this application;

FIG. 12D-1 and FIG. 12D-2 are schematic diagrams of notificationsdisplayed on a notification bar display interface according to anembodiment of this application;

FIG. 12E is a flowchart of notification classification on a mobileterminal side according to an embodiment of this application;

FIG. 12F shows an example of jump information according to an embodimentof this application;

FIG. 12G shows an example of jump rule according to an embodiment ofthis application;

FIG. 12H is a flowchart of offline notification classification modeltraining according to an embodiment of this application;

FIG. 12I shows a new training sample added process according to anembodiment of this application;

FIG. 12J is a flowchart of a classification feedback mechanism accordingto an embodiment of this application;

FIG. 12K shows a personalized sorting process of a notification typeaccording to an embodiment of this application;

FIG. 13 is a flowchart of another embodiment of a notification displaymethod according to an embodiment of this application;

FIG. 14 is a schematic diagram of notifications displayed on anotification bar display interface according to an embodiment of thisapplication;

FIG. 15 is a schematic diagram of an embodiment of a terminal accordingto an embodiment of this application;

FIG. 16 is a schematic diagram of an embodiment of a terminal accordingto an embodiment of this application; and

FIG. 17 is a schematic diagram of an embodiment of a terminal accordingto an embodiment of this application.

DESCRIPTION OF EMBODIMENTS

The technical solutions in the embodiments of this application aredescribed below with reference to the accompanying drawings in theembodiments of this application. The described embodiments are merely apart rather than all of the embodiments of this application.

In the specification, claims, and accompanying drawings of thisapplication, the phrases “first”, “second”, “third”, “fourth”, and so on(if existent) are intended to distinguish between similar objects but donot necessarily indicate a specific order or sequence. It should beunderstood that, the data termed in such a way are interchangeable inproper circumstances, so that the embodiments of the present inventiondescribed herein can be implemented in other orders than the orderillustrated or described herein. Moreover, the phrases “comprise”,“include” and any other variants mean to cover the non-exclusiveinclusion, for example, a process, method, system, product, or devicethat includes a list of operations or units is not necessarily limitedto those units, but may include other units not expressly listed orinherent to such a process, method, system, product, or device.

Embodiments of this application provide a notification message displaymethod and a terminal, to facilitate search for important information bya user and improve user experience.

To help understand the embodiments of this application, some phrasesrelated to the embodiments of this application are defined below.

Notification bar: The notification bar is a display area, in a terminal,used for centralized presentation of received notification messages. Thenotification messages in this application include but are not limitedto: a short message, an instant message (for example, a QQ, WeChat, orSMS message), a push message (for example, a new issue, anadvertisement, or recommended news) from a client, and ongoing things(for example, a music player, and a download progress during versionupdate). Based on different notification mechanisms of the terminals,the notification messages may be displayed in different forms on thenotification bar.

Ongoing attribute: The ongoing attribute is used to indicate an ongoingnotification, and is usually used to indicate a background task (forexample, playing music) in which a user is actively participating or abackground task for which a user is waiting in a manner. An applicationservice provider may assign, based on a requirement, the ongoingattribute to a notification message that requires continuous attentionof the user.

Text information: The text information is text content given by anapplication when the application generates a notification.

Jump information: The jump information is a description that is given bythe application and that is related to jumping to a specific interfaceto load a specific resource after a notification is clicked. The jumpinformation in the embodiments of this application includes at least oneof the following: an Action field, a Class field, a uriString field, andan extras field. Standard jump information includes: the Action field,the Class field, and the uriString field, and a user-defined fieldincludes the extras field.

Application package name information: The application package nameinformation is used to indicate an application that triggers ato-be-notified event, that is, used to indicate an application thatsends a notification.

Rule repository: The rule repository is a set of rules used to bematched against matching information.

Display pane: The display pane is a display object, on a notificationdisplay interface, used to distinguish between notifications ofdifferent sets, and the terminal determines that notifications belongingto a same set need to be placed in a same display pane. The displayobject may specifically be a rectangular frame, a list, or anotherobject. For example, in FIG. 1B, A1, A2, B1, and B2 are notifications tobe displayed by the terminal. A1 and A2 form a display set, and A is adisplay pane corresponding to the set. B1 and B2 form a display set, andB is a display pane corresponding to the set. For another example, inFIG. 1C, A1, A2, B1, and B2 are notifications to be displayed by theterminal. A1 and A2 form a display set, and C is a display panecorresponding to the set. B1 and B2 form a display set, and D is adisplay pane corresponding to the set.

Obtaining time: The obtaining time is a time for obtaining anotification by the terminal.

With development of smart services, some intelligent notifications orservices may be provided on the terminal based on a historical behaviorhabit of the user or some rules or models, to facilitate use of theterminal by the user, so that the user feels that the terminal becomesmore intelligent.

The various smart services may be implemented by the terminal or acombination of the terminal and a cloud. Specifically, the terminal mayinclude a rule platform, an algorithm platform, and a user profileplatform. The terminal may implement various smart services, forexample, 1. Service recommendation service, 2. Notification service, and3. Notification filtering service, by using one or more of these threeplatforms and other resources.

1. Service recommendation service: The terminal includes arecommendation service framework configured to implement the servicerecommendation service. The recommendation service framework may includeat least the algorithm platform, the rule platform, and the user profileplatform. The rule platform may find, through matching according to arule, a service that the user of the terminal expects to use in acurrent scenario. The algorithm platform may predict, based on a model,a service that the user of the terminal expects to use in a currentscenario. The recommendation service framework may place the servicepredicted by the rule platform or the algorithm platform into a displayinterface of a recommendation application, so that the user can easilyenter an interface corresponding to the service through the displayinterface of the recommendation application. The rule may be deliveredby a server (that is, the cloud) to the terminal. The rule may beobtained through big data statistics, or may be obtained through summarybased on empirical data. The model may be obtained in the followingmanner: User historical data and user feature data is trained by usingthe algorithm platform, to obtain the model; and the model may beupdated based on new user data and feature data. The user historicaldata may be behavioral data of the user using the terminal within a timeperiod. The user feature data may include a user profile or another typeof feature data. For example, the another type of feature data may bebehavioral data of the current user. The user profile may be obtainedthrough the user profile platform of the terminal.

2. Notification service: The terminal includes a recommendationframework (framework) configured to implement the notification service.The recommendation framework may include at least the rule platform, agraphical user interface (GUI), and the user profile platform. The ruleplatform may listen to various events. The application in the terminalmay register various rules with the rule platform. The rule platformthen listens to, based on the registered rules, the various events inthe terminal, matches the found events against the rules, and triggers,when a found event matches all conditions of a rule, a notificationcorresponding to the rule, that is, recommends a highlight event to theuser. The notification is finally displayed by a graphical userinterface or the application that registers the rule. Conditions of somerules may limit the user profile. The rule platform may request acurrent user profile from the user profile platform, to determinewhether the current user profile matches a condition in the rules.

3. Notification filtering service: The terminal includes a notificationfiltering framework configured to implement the notification filteringservice. The notification filtering framework may include at least therule platform, the algorithm platform, and the user profile platform.When obtaining a notification, the notification filtering framework maydetermine a notification type by using the rule platform, or maydetermine a notification type through the algorithm platform; and thendetermines, based on the notification type and user preference, whetherthe notification is a notification in which the user is interested, anddisplays, based on the notification in which the user is interested anda notification in which the user is not interested, the notification indifferent manners. The user preference may include the user profile, ormay include historical processing behavior of the user for one type ofnotification. The user profile is provided by the user profile platform.

It should be noted that the terminal may include one rule platform, andthe rule platform provides a capability required by each framework tothe foregoing three frameworks. The terminal may alternatively include aplurality of rule platforms, and the plurality of rule platformsrespectively provide capabilities to the foregoing three frameworks.Similarly, the terminal may include one algorithm platform, and thealgorithm platform provides a capability required by each framework tothe recommendation service framework and the notification filteringframework; or the terminal may include two algorithm platforms, torespectively provide capabilities to the two frameworks. The terminalmay include one user profile platform, and the user profile platformprovides a capability required by each framework to the foregoing threeframeworks. Alternatively, the terminal may include a plurality of userprofile platforms, to respectively provide a capability to eachframework.

The following embodiments of this application mainly provide a detaileddescription of the third service described above, that is, thenotification filtering service. The following description of the ruleplatform, the user profile platform, and the algorithm platform ismainly used to describe functions related to the notification filteringservice, and the rule platform, the user profile platform, and thealgorithm platform included in the terminal are not limited to thefunctions described below.

The embodiments of this application provide a notification displaymethod and a terminal, capable of helping the user screen effectivenotification messages, thereby improving user experience.

A terminal 100 in this embodiment of this application may include, butis not limited to: a mobile phone, a tablet computer, an e-reader, apersonal digital assistant (PDA), a vehicle-mounted electronic device, awearable device, a virtual reality (VR) device, an augmented reality(AR) device, or the like. An operating system of the terminal 100 may bea system such as Android, iOS, Windows Phone, or BlackBerry OS. This isnot specifically limited in the embodiments of this application.

For example, the terminal device 100 is a mobile phone. FIG. 1A is ablock diagram of a part of a structure of a mobile phone 100 related tothis embodiment of this application. Referring to FIG. 1A, the mobilephone 100 includes components such as an RF (radio frequency) circuit110, a memory 120, another input device 130, a display screen 140, asensor 150, an audio frequency circuit 160, an I/O subsystem 170, aprocessor 180, and a power supply 190. A person skilled in the art mayunderstand that the structure of the mobile phone shown in FIG. 1A doesnot constitute a limitation to the mobile phone, and the mobile phonemay include more components or fewer components than those shown in thefigure, or some components may be combined, or some components may beseparated, or a different component deployment may be used. A personskilled in the art may understand that the display screen 140 belongs toa user interface (UI, User Interface), and the mobile phone 100 mayinclude more or fewer user interfaces than those shown in the figure.

The following specifically describes the components of the mobile phone100 with reference to FIG. 1A.

An RF circuit 110 may be configured to receive and send information andreceive and send a signal during a call process. Specifically, the RFcircuit receives downlink information from a base station, then deliversthe downlink information to a processor 180 for processing, and sendsrelated uplink data to the base station. Usually, the RF circuitincludes, but is not limited to, an antenna, at least one amplifier, atransceiver, a coupler, a low noise amplifier (LNA), a duplexer, and thelike In addition, the RF circuit 110 may also communicate with a networkand another device by wireless communication. The wireless communicationmay use any communications standard or protocol, including but notlimited to: Global System for Mobile Communications (GSM), GeneralPacket Radio Service (GPRS), Code Division Multiple Access (CDMA),Wideband Code Division Multiple Access (WCDMA), Long Term Evolution(LTE), email, a short messaging service (SMS), and the like.

The memory 120 may be configured to store a software program and amodule. The processor 180 runs the software program and the modulestored in the memory 120, to implement various functional applicationsand data processing of the mobile phone 100. The memory 120 may mainlyinclude a program storage area and a data storage area. The programstorage area may store an operating system, an application programrequired by at least one function (such as a sound playback function andan image display function), and the like. The data storage area maystore data (such as audio data and an address book) created based on useof the mobile phone 100, and the like. In addition, the memory 120 mayinclude a high-speed random access memory, and may further include anon-volatile memory such as at least one disk storage device, a flashmemory device, or another volatile solid-state storage device.

The another input device 130 may be configured to receive input digit orcharacter information, and generate a keyboard signal input related tothe user setting and function control of the mobile phone 100.Specifically, the another input device 130 may include but is notlimited to one or more of a physical keyboard, a function key (forexample, a volume control key or a power on/off key), a trackball, amouse, a joystick, or an optical mouse (the optical mouse is atouch-sensitive surface that does not display a visible output, or anextension of a touch-sensitive surface including a touchscreen). Theanother input device 130 is connected to another input device controller171 of the I/O subsystem 170, and performs signal interaction with theprocessor 180 under the control of the another device input controller171.

The display screen 140 may be configured to display information input bythe user or information provided for the user, and various menus of themobile phone 100, and may further receive a user input. Specifically,the display screen 140 may include a display panel 141 and a touch panel142. The display panel 141 may be configured by using an LCD (liquidcrystal display), or an OLED (organic light-emitting diode), or inanother form. The touch panel 142 is also referred to as a touchscreen,a touch-sensitive screen, or the like, and may collect a touch operationor non-touch operation of a user on or near the touch panel (such as anoperation of a user on the touch panel 142 or near the touch panel 142by using any suitable object or accessory such as a finger or a stylus,or including a motion sensing operation including operation types suchas an isolated control operation and a multipoint control operation),and drives a corresponding connection apparatus according to a presetprogram. Optionally, the touch panel 142 may include two parts: a touchdetection apparatus and a touch controller. The touch detectionapparatus detects a touch position and a gesture of the user, detects asignal generated by the touch operation, and transfers the signal to thetouch controller. The touch controller receives touch information fromthe touch detection apparatus, converts the touch information intoinformation that may be processed by the processor and sends theinformation to the processor 180, and may receive a command sent by theprocessor 180 and execute the command. In addition, the touch panel 142may be implemented by using various types, such as a resistive type, acapacitance type, an infrared type, and a surface sound wave type.Alternatively, the touch panel 142 may be implemented by using anytechnology developed in the future. Further, the touch panel 142 maycover the display panel 141. The user may perform, based on contentdisplayed on the display panel 141 (where the displayed content includesbut is not limited to a soft keyboard, a virtual mouse, a virtual key,an icon, or the like), an operation on or near the touch panel 142covering the display panel 141. After detecting the touch operation onor near the touch panel 142, the touch panel 142 transfers the touchoperation to the processor 180 by using the I/O subsystem 170 todetermine a type of a touch application, to determine a user input.Subsequently, the processor 180 provides a corresponding visual outputon the display panel 141 based on the type of the touch application andbased on the user input by using the I/O subsystem 170. Although in FIG.1A, the touch panel 142 and the display panel 141 are used as twoseparate components to implement input and output functions of themobile phone 100, in some embodiments, the touch panel 142 and thedisplay panel 141 may be integrated to implement the input and outputfunctions of the mobile phone 100.

The mobile phone 100 may further include at least one sensor 150, suchas a light sensor, a motion sensor, and other sensors. Specifically, theoptical sensor may include an ambient light sensor and a proximitysensor. The ambient light sensor may adjust luminance of the displaypanel 141 according to brightness of the ambient light. The proximitysensor may switch off the display panel 141 and/or backlight when themobile phone 100 is moved to the ear. As one type of motion sensor, anacceleration sensor may detect magnitude of accelerations in variousdirections (generally on three axes), may detect magnitude and adirection of the gravity when static, and may be configured to identifyan application of the mobile phone gesture (such as switchover betweenlandscape orientation and portrait orientation, a related game, andgesture calibration of a magnetometer), a function related to vibrationrecognition (such as a pedometer and a knock), and the like. Othersensors such as a gyroscope, a barometer, a hygrometer, a thermometer,and an infrared sensor that may be further configured in the mobilephone 100. Details are not described herein again.

The audio frequency circuit 160, a speaker 161, and a microphone 162 mayprovide audio interfaces between the user and the mobile phone 100. Theaudio circuit 160 may convert received audio data into a signal andtransmit the signal to the speaker 161. The speaker 161 converts thesignal into a sound signal for output. On the other hand, the microphone162 converts a collected sound signal into a signal. The audio circuit160 receives the signal and converts the signal into audio data, andoutputs the audio data to the RF circuit 108 to send the audio data to,for example, another mobile phone, or outputs the audio data to thememory 120 for further processing.

The I/O subsystem 170 is configured to control input and outputperipheral devices, and may include the another device input controller171, a sensor controller 172, and a display controller 173. Optionally,one or more another input control device controllers 171 receive asignal from the another input device 130 and/or send a signal to theanother input device 130. The another input device 130 may include aphysical button (a pressing button, a rocker button, and the like), adial pad, a slider switch, a joystick, a click scroll wheel, or anoptical mouse (the optical mouse is a touch-sensitive surface that doesnot display a visible output, or an extension of a touch-sensitivesurface formed by a touchscreen). It should be noted that, the anotherinput control device controller 171 may be connected to any one of or aplurality of the foregoing devices. The display controller 173 in theI/O subsystem 170 receives a signal from the display screen 140 or sendsa signal to the display screen 140. After the display screen 140 detectsthe user input, the display controller 173 converts the detected userinput into interaction with an object displayed on the user interface ofthe display screen 140, that is, man-machine interaction is implemented.The sensor controller 172 may receive a signal from one or more sensors150 and/or may send a signal to the one or more sensors 150.

The processor 180 is a control center of the mobile phone 100, and isconnected to various parts of the entire mobile phone by using variousinterfaces and lines. By running or executing a software program and/ormodule stored in the memory 120, and invoking data stored in the memory120, the processor 1080 executes various functions of the mobile phone100 and performs data processing, thereby monitoring the entire mobilephone. Optionally, the processor 180 may include one or more processingunits. Preferably, the processor 180 may integrate an applicationprocessor and a modem. The application processor mainly processes anoperating system, a user interface, an application program, and thelike. The modem mainly processes wireless communication. It may beunderstood that the foregoing modem processor may not be integrated intothe processor 180.

The mobile phone 100 further includes the power supply 190 (such as abattery) for supplying power to the components. Optionally, the powersupply may be logically connected to the processor 180 by using a powermanagement system, thereby implementing functions such as charging anddischarging management and power consumption management by using thepower management system.

Although not shown, the mobile phone 100 may further include a camera, aBluetooth module, and the like, and details are not described hereinagain.

Two applications, that is, “Today's Headline” and “Phone Manager” areinstalled on the mobile phone 100. By monitoring notification messagestriggered by the two applications, at 10:50, the mobile phone receives anotification message “Supermarket A Takes a Full Exit of the China”pushed by the “Today's Headline” and a notification message “Batterylower than 20%” sent by the “Phone Manager”. In this case, if the mobilephone is in a locked state, the mobile phone sends a correspondingnotification (such as ring, vibration, or a flashing light), anddisplays the notification message on a lock screen interface, as shownin FIG. 2A. If the mobile phone is in an unlocked state, the mobilephone sends a corresponding notification, and displays the notificationmessage on a current display interface (such as a desktop), as shown inFIG. 2B.

When obtaining an instruction for invoking the notification bar, themobile phone displays, in a centralized manner on the notification bar,notification messages that are not read by the user. For example, theuser slides down from the top of the display screen of the mobile phoneto invoke the notification bar, and the mobile phone covers a part ofthe notification bar on the current display interface, as shown in FIG.2C-1 and FIG. 2C-2, or covers all the notification bar on the currentdisplay interface, as shown in FIG. 2D-1 and FIG. 2D-2, and centralizesthe unread notification messages belonging to a same application into asame pane for expanded display.

According to the foregoing embodiment, classification and display areperformed based only on the application to which the notificationmessage belongs, which cannot help the user screen effective messages.When there are too many notification messages, the user still needs tosearch for interesting notification messages one by one for reading,which takes a relatively long time and has relatively low efficiency.

For ease of understanding, the following describes a scenario applicableto the notification display method and the terminal in the embodimentsof this application.

FIG. 3 shows a system to which a notification display method is appliedaccording to an embodiment of this application. The system includes aterminal 302 and a service system that includes at least a server 301.The server 301 is configured to generate a rule and a model that areused to classify notifications in this embodiment of this application.The terminal 302 is configured to classify and display notificationssent by various applications of the terminal.

The server 301 collects a large number of notifications manually labeledwith notification types as sample data, obtains, by analyzing the sampledata, a plurality of rules used for classification, and obtainsclassification models by training the sample data through aclassification algorithm.

It should be understood that, the sample data collected by the server301 needs to include as many applications as possible in the market. Thesample data may be reported by a user to the server 301 during a processof using the terminal 302, or may be reported by an operation andmaintenance engineer to the server 301 by using a test mobile phone.

The rules and the classification models generated by the server 301 maybe uploaded to the terminal 302 by a maintenance personnel beforedelivery of the terminal 302; or the rules and the classification modelsare automatically sent by the server 301 to the terminal 302 afterdelivery of the terminal 302; or the rules and the classification modelsare downloaded, based on a user operation, from the server 301 afterdelivery of the terminal 302.

It should be understood that, because new applications are continuouslylaunched in the market, the server 301 needs to update the generatedrules and the generated classification models periodically oraperiodically, and the terminal 302 downloads the updated rules and theupdated classification models from the server 301.

It should be noted that, in addition to the foregoing scenariocorresponding to FIG. 3, in some embodiments, the rules and theclassification models that are used for classification may be generatedby the terminal or another device, and the generation method thereof isthe same as the manner in which the server generates the rules and theclassification models. Details are not described herein again.

The following describes a process in which the terminal 302 classifies,based on the classification rules and the classification models, thenotifications sent by the applications. Referring to FIG. 4, anembodiment of a notification display method in the embodiments of thisapplication includes the following operations.

401: A terminal obtains matching information from object information ofa to-be-notified event, and matches the matching information against atleast one rule in a rule repository.

In one embodiment, when there is a to-be-notified event, the terminalobtains the matching information from the object information of theto-be-notified event, and matches the matching information against atleast one rule in the rule repository. The object information includestext information, jump information, and application package nameinformation corresponding to the to-be-notified event. Each ruleincludes at least one condition, and each rule corresponds to onenotification type.

It should be understood that, the to-be-notified event may include alocal notification event and a push notification event. The localnotification event is a notification event triggered by a localapplication and is a notification form that is based on time behavior,such as alarm clock timing and a to-do reminder. The push notificationevent is a notification event that is sent by an application serviceprovider to an application client, that is, a notification eventobtained by an application of the terminal, such as an applicationupdate notification.

It should be understood that the rule repository includes a plurality ofrules used for classification, and the rules may be divided into twotypes: text rules and jump rules.

Specifically, when there is a to-be-notified event, the terminal mayfirst obtain the text information and/or the application package nameinformation of the to-be-notified event, and match the text informationand/or the application package name information against the text rules.If the text rule matching fails, the terminal obtains the jumpinformation of the to-be-notified event and matches the jump informationagainst the jump rules. If the jump rule matching fails, the terminaldetermines that the matching information of the to-be-notified eventfails to match the rules in the rule repository.

The following separately describes examples of the text rule and thejump rule.

1. Text Rule

In the embodiments of this application, the text rule may be subdividedinto two types: general rules and special rules. Each general ruleincludes at least one text matching condition and corresponds to onenotification type. Each special rule includes at least one text matchingcondition and an application package name matching conditioncorresponding to the text matching condition and corresponds to onenotification type.

For any general rule, if the text information of the to-be-notifiedevent satisfies a text matching condition in the general rule, it isdetermined that the matching information of the to-be-notified eventmatches the general rule, and a notification type corresponding to thegeneral rule is a notification type of a notification corresponding tothe to-be-notified event. On the contrary, if the text information ofthe to-be-notified event dissatisfies a text matching condition in thegeneral rule, it is determined that the matching information of theto-be-notified event does not match the general rule.

For any special rule, if the text information of the to-be-notifiedevent satisfies a text matching condition in the special rule and theapplication package name information corresponding to the to-be-notifiedevent satisfies the application package name matching conditioncorresponding to the text matching condition in the special rule, it isdetermined that the matching information of the to-be-notified eventmatches the special rule, and a notification type corresponding to thespecial rule is a notification type of a notification corresponding tothe to-be-notified event. On the contrary, if the text information ofthe to-be-notified event dissatisfies a text matching condition in thespecial rule and/or the application package name information of theto-be-notified event dissatisfies an application package name matchingcondition in the special rule, it is determined that the matchinginformation of the to-be-notified event does not match the special rule.

For any to-be-notified event, if a matching general rule or special rulecannot be found, in the rule repository, for matching information of theto-be-notified event, it is determined that the matching information ofthe to-be-notified event fails to match the text rule.

The following separately describes examples of the general rule and thespecial rule.

(1) General Rule

In this embodiment, the text matching condition in the general rulecorresponds to at least one key phrase and/or keyword and a logicalrelationship between key phrases and/or keywords.

The text information of the to-be-notified event satisfies the textmatching condition in the general rule. Specifically, the textinformation of the to-be-notified event may include at least one presetkey phrase and/or keyword, and the key phrases and/or keywords satisfy apreset logical relationship.

Optionally, in some embodiments, there is no logical relationshipbetween key phrases and/or keywords included in the text matchingcondition in the general rule. It is considered that the textinformation of the to-be-notified event satisfies the text matchingcondition in the general rule, provided that the text information of theto-be-notified event includes the key phrases and/or keywords.

(2) Special Rule

In one embodiment, the text matching condition in the general rulecorresponds to at least one key phrase and/or keyword and a logicalrelationship between key phrases and/or keywords.

The text information of the to-be-notified event satisfies the textmatching condition in the special rule. Specifically, the textinformation of the to-be-notified event may include at least one presetkey phrase and/or keyword, and the key phrases and/or keywords satisfy apreset logical relationship.

Optionally, in some embodiments, there is no logical relationshipbetween key phrases and/or keywords included in the text matchingcondition of the special rule. It is considered that the textinformation of the to-be-notified event satisfies the text matchingcondition in the special rule, provided that the text information of theto-be-notified event includes the key phrases and/or keywords.

In this embodiment, the application package name matching condition ofthe general rule further includes at least one piece of applicationpackage name information.

The application package name information corresponding to theto-be-notified event satisfies the application package name matchingcondition corresponding to the text matching condition in the specialrule. Specifically, application package name information correspondingto the preset key phrases and/or keywords included in the to-be-notifiedevent may include the application package name information correspondingto the to-be-notified event.

In some embodiments, the server may generate the text matching conditionof the general rule in the following manner.

The server obtains notifications that are sent by different applicationsand that are manually labeled with notification types, and analyzes textinformation of the notifications. If notifications whose textinformation includes some key phrases and/or keywords having a logicalrelationship always belong to a notification type (recorded as a firstnotification type), the key phrases and/or keywords and the logicalrelationship between the key phrases and/or keywords are used as thetext matching condition in the general rule, and the text matchingcondition corresponds to the first notification type. If onlynotifications that are sent by some applications and whose textinformation includes some key phrases and/or keywords having a logicalrelationship belong to a notification type (recorded as a secondnotification type), the key phrases and/or keywords having the logicalrelationship and the logical relationship between the key phrases and/orkeywords are used as the text matching condition in the special rule,application package name information of the applications is used as theapplication package name matching condition corresponding to the textmatching condition, and the special rule corresponds to the secondnotification type.

It should be understood that the logical relationship described in thisembodiment refers to linguistic logic and a linguistic order, forexample, and, or, non, or a sequence of phrases or words.

The following example describes a process in which the server generatesthe special rule and the general rule.

Scenario A: In the sample data, notifications that include “beingdownloaded”, “being uploaded”, “downloading”, “uploading”, “downloadfailed”, and “upload failed” and that are sent by different applicationsare all labeled as a notification type “operating status”. Samplenotifications that include “payment succeeds” and “payment successful”and that are sent by the application Alipay and the application WeChatare all labeled as the notification type “consumption”. Sample data thatincludes key phrases “payment succeeds” and “payment successful” andthat is sent by an application other than the application Alipay and theapplication WeChat is labeled as a notification type “risk alert”.

A server generates a general rule x. The notification type correspondingto this general rule is “operating status”, keywords (key phrases)corresponding to the text matching condition that is included in thegeneral rule are “being”, “download”, “upload”, “ing” and “fail”. Thesekeywords (key phrases) satisfy a logical relationship that “download”and “upload” are preceded by the key phrase “being”, or key phrases“fail” and “ing” are preceded by the key phrases “download” and“upload”.

The server generates two special rules y and z. Key phrasescorresponding to the text matching condition that are included in thetwo special rules are all “payment”, “pay” and “successful”. These keyphrases satisfy a logical relationship that key phrases “payment” or“pay” is preceded by the key phrase “successful”. The applicationpackage name information corresponding to the application package namematching condition that is included in the special rule y are “Alipay”and “WeChat”, and the notification type corresponding to the specialrule is “consumption”. Application package name informationcorresponding to the application package name matching condition that isincluded in the special rule z is application package name informationof an application other than “Alipay” and “WeChat”, and the notificationtype corresponding to the special rule is “risk alert”.

The rules x, y and z are generated based on the scenario A. The mannerin which a terminal matches the matching information against the generalrule and the special rule is described in examples as follows:

A terminal triggers to generate two to-be-notified events v and w. Theto-be-notified event v is triggered by “Phone Manager”, and the textinformation of the to-be-notified event v is “Arena of Valor” beingdownloaded”. The text information includes keywords “being” and“download” corresponding to the text matching condition in the rule x,and a logical relationship that “download” is preceded by “being” issatisfied. The text information of the to-be-notified event v matchesthe general rule x. The notification type “operating status”corresponding to the general rule x is the notification type of thenotification corresponding to the to-be-notified event v.

Another to-be-notified event w is triggered by “WeChat”. The textinformation of the to-be-notified event w is “DiDi: payment successful”.The text information includes keywords “payment” and “successful”corresponding to the text matching condition in the special rule y, andthe logical relationship that “payment” is preceded by “successful” issatisfied. The text information of the to-be-notified event w satisfiesthe text matching condition in the special rule y. The applicationpackage name information of the to-be-notified event w “WeChat”, whichcorresponds to “WeChat” in the application package name information inthe application package name matching condition in the special rule y.The application package name information of the to-be-notified event wsatisfies the application package name matching condition in the specialrule y. The matching information of the to-be-notified event w matchesthe special rule y, and the notification type “consumption”corresponding to the special rule y is the notification type of thenotification corresponding to the to-be-notified event w.

2. Jump Rule

In an embodiment of this application, each jump rule includes at leastone jump matching condition, and an application package name matchingcondition corresponding to each jump matching condition, and each jumprule corresponds to a notification type.

For any to-be-notified event, if the jump information of theto-be-notified event satisfies a jump matching condition of any jumprule, and the application package name information of the to-be-notifiedevent satisfies the application package name matching conditioncorresponding to the jump matching condition, it is determined that thejump information of the to-be-notified event matches the jump rule, andthe notification type corresponding to the jump rule is the notificationtype of the notification corresponding to the to-be-notified event. Ifthe jump information of the to-be-notified event does not satisfy a jumpmatching condition of any jump rule and/or the application package nameinformation the to-be-notified event does not satisfy the applicationpackage name matching condition, it is determined that the jumpinformation of the to-be-notified event does not match any jump rule.

In some embodiments, the jump matching condition may be subdivided intoa fuzzy match condition and an exact match condition, and the two jumpmatching condition are separately described as follows.

(1) Exact Match Condition

In this embodiment, each exact match condition corresponds to somefields, and corresponds to a character string (which may also bereferred to as a field value) corresponding to each field.

The terminal obtains all fields in the jump information of theto-be-notified event and the value of each field. If all fields in thejump information are consistent with some fields corresponding to theexact match condition, and the value of each field in the jumpinformation is consistent with the character string corresponding to thefield in the exact match condition, the terminal determines that thejump information of the to-be-notified event satisfies the exact matchcondition.

In one embodiment, the application package name matching conditioncorresponding to each exact match condition includes at least one pieceof application package name information.

The terminal obtains the application package name informationcorresponding to the to-be-notified event. If the application packagename information corresponding to the exact match condition satisfied bythe jump information of the to-be-notified event is the same as theapplication package name information corresponding to the to-be-notifiedevent, the terminal determines that the application package nameinformation of the to-be-notified event satisfies the applicationpackage name matching condition corresponding to the exact matchcondition.

(2) Fuzzy Match Condition

In one embodiment, each fuzzy match condition corresponds to somefields, and corresponds to a character string (which may also bereferred to as a field value) corresponding to each field.

The terminal obtains all fields in the jump information of theto-be-notified event and a value of each field. If all fields in thejump information are consistent with several fields corresponding to afuzzy match condition, and a value of each field in the jump informationincludes a character string corresponding to a field in an accuratematch condition, the terminal determines that the jump information ofthe to-be-notified event matches the fuzzy match condition.

Specifically, in some embodiments, the several fields corresponding tothe fuzzy match condition include a standard field and a user-definedfield.

The terminal obtains all standard fields and a value corresponding toeach standard field (standard jump information), and all user-definedfields and a value corresponding to each user-defined field(user-defined jump information) that are in the jump information of theto-be-notified event. If all standard fields in the jump information arethe same as all standard fields corresponding to the fuzzy matchcondition, all user-defined fields in the jump information are the sameas all user-defined fields corresponding to the fuzzy match condition, avalue of each standard field in the jump information is the same as acharacter string corresponding to the standard field in the fuzzy matchcondition, and a value of each user-defined field in the jumpinformation includes a character string corresponding to theuser-defined field in the fuzzy match condition, the terminal determinesthat the jump information of the to-be-notified event matches the fuzzymatch condition.

In one embodiment, an application package name match conditioncorresponding to each accurate match condition includes at least onepiece of application package name information.

The terminal obtains application package name information correspondingto the to-be-notified event. If application package name informationcorresponding to a fuzzy match condition matched by the jump informationof the to-be-notified event is the same as application package nameinformation corresponding to the to-be-notified event, the terminaldetermines that the application package name information of theto-be-notified event matches an application package name match conditioncorresponding to the fuzzy match condition.

In some embodiments, a server configured to generate a classificationrule may generate a jump rule in the following manner: For eachapplication, sample notifications with different text information thatare sent from an application are collected (A sample notification meansa notification manually labeled with a notification type). If all fieldsincluded in jump information of notifications labeled with a samenotification type sent by the application are the same, and a value ofeach field is also the same, all fields and a value (character string)of each field that are included in the jump information of thenotifications are used as an accurate match condition. Applicationpackage name information of the application is used as an applicationpackage name match condition, and the application package name matchcondition corresponds to the accurate match condition.

The following uses an example to describe a process in which the servergenerates the accurate match condition.

Scenario B: There are 100 notifications that have different textinformation and that are sent by Tencent Phone Manager in sample datacollected by the server. Intent objects (jump information) of the 100notifications include a Class field. Notification types of the 100notifications are all labeled as a “Phone Optimization”. Class fields ofthe 100 notifications labeled as “content information” are all“com.tencent.serverfore.QuickLoadActivity”. The server stores, in theterminal, the Class field and a value of“com.tencent.server.fore.QuickLoadActivity” corresponding to the Classfield as an accurate match condition of a jump rule, and stores, in theterminal, application package name information (com.tencent.qqpimsure)of “Tencent Phone Manager” as an application package name matchcondition of the jump rule. A notification type corresponding to thejump rule is the “Phone Optimization”. The jump rule may be specificallystored in the terminal in a form shown in FIG. 5A.

Based on the rule generated in the foregoing scenario B, the followinguses a manner in which the terminal matches the matching informationagainst the accurate match condition as an example for description.

The terminal triggers to generate one to-be-notified event. Objectinformation of the to-be-notified event is shown in FIG. 5B. An Intentobject (object information) of the to-be-notified event includes a Classfield (jump information). A value of the Class filed is“com.tencent.server.fore.QuickLoadActivity”. Package name information ofthe to-be-notified event is “com.tencent.qqpimsure”. The terminaldetermines that a notification type of a notification corresponding tothe to-be-notified event is the “Phone Optimization”.

For some special applications, all fields included in jump informationof notifications that are sent by the special applications and that arelabeled as a same notification type are the same, and a value of eachfield has a same character string. All fields and a same characterstring in a value of each field that are in the jump information areused as a fuzzy match condition. Application package name information ofthe application is used as an application package name match condition.The application package name match condition corresponds to the fuzzymatch condition.

For some special applications, all fields included in jump informationof notifications that are sent by the special applications and that arelabeled as a same notification type are the same. Values of standardjump fields are the same, and values of user-defined jump fields have asame character string. Various standard jump fields, values (characterstrings) of various standard jump fields, various user-defined fields,and a same character string in each user-defined field that are in thejump information are used as a fuzzy match condition. Applicationpackage name information of the application is used as an applicationpackage name match condition. The application package name matchcondition corresponds to the fuzzy match condition.

It should be understood that, a rule in the rule repository is obtainedby using notifications manually labeled with notification types assample data for induction. Therefore, specific notification types dependon notification types manually labeled. For example, notifications areclassified into the following types: advertisement promotion, contentinformation, social dynamic, phone optimization, running status,consumption, prompt, and immediate communication. A notification typedetermined according to a rule is one of the foregoing types.

In one embodiment, labeling personnel may classify notifications for anotification being performed (that is, a notification having an ongoingattribute) and a notification not being performed (that is, anotification not having an ongoing attribute). Text rules may beclassified into a text rule corresponding to a notification beingperformed, and a text rule corresponding to a notification not beingperformed. Jump rules may be classified into a jump rule correspondingto a notification being performed and a jump rule corresponding to anotification not being performed.

In some embodiments, when there is a to-be-notified event on theterminal, if a notification corresponding to the to-be-notified event isthe notification being performed, a notification type to which thenotification belongs is determined according to a text rule and a jumprule that are corresponding to the notification being performed. If thenotification is a notification not being performed, the notificationtype to which the notification belongs is determined according to a textrule and a jump rule that are corresponding to the notification notbeing performed.

402. If the matching succeeds, the terminal determines the notificationtype of the notification corresponding to the to-be-notified event basedon a notification type corresponding to the matching rule.

If the text information of the to-be-notified event matches a generalrule in the rule repository, a notification type corresponding to thegeneral rule is the notification type of the notification correspondingto the to-be-notified event.

If the text information and the application package name information ofthe to-be-notified event matches a special rule in the rule repository,a notification type corresponding to the special rule is thenotification type of the notification corresponding to theto-be-notified event.

If the jump information of the to-be-notified event matches a jump rulein the rule repository, a notification type corresponding to the jumprule is the notification type of the notification corresponding to theto-be-notified event.

403. If the matching fails, the terminal extracts at least one piece offeature information from the object information of the to-be-notifiedevent, analyzes the feature information by using a classification model,and determines the notification type of the notification correspondingto the to-be-notified event based on an analysis result.

In some embodiments, the classification model may include at least oneof or a combination of several of a jump classification model, a textclassification model, and a fusion model. The jump classification modelis used to obtain a first category based on a text informationeigenvector of the notification, the text classification model is usedto obtain a second category based on a jump information eigenvector ofthe notification, and the fusion model is used to obtain a finalclassification result, that is, the notification type, based on thefirst category and the second category.

Specifically, if the matching information of the to-be-notified eventdoes not match any rule in the rule repository, the terminal extracts atleast one text information eigenvector from the text information of theto-be-notified event, and extracts at least one jump informationeigenvector from the jump information of the to-be-notified event; thenobtains the first category through analyzing the extracted textinformation eigenvector by using the text classification model, andobtains the second category through analyzing the extracted jumpinformation eigenvector by using the jump classification model; andfinally obtains an analysis result, that is, obtains the notificationtype of the to-be-notified event through analyzing the first categoryand the second category by using the fusion model.

More specifically, that the terminal extracts at least one textinformation eigenvector from the text information of the to-be-notifiedevent may be performed in the following manner: The terminal divides thetext information of the to-be-notified event into several words and/orseveral phrases, and combines the several words and/or the severalphrases through vectorization, to obtain the text informationeigenvector.

More specifically, that the terminal extracts at least one jumpinformation eigenvector from the jump information of the to-be-notifiedevent may be performed in the following manner: The terminal dividesvalues of all fields in the jump information of the to-be-notified eventinto several character strings, and combines the several charactersthrough vectorization, to obtain the jump information eigenvector.

It should be understood that, the classification model may be obtainedthrough training performed by a server on a large quantity of sampledata based on data processing logic. In some embodiments in thefollowing, FIG. 6 is a flowchart of training a classification modeloffline. A training procedure specifically includes the followingoperations:

S1. Collect notifications of a large quantity of notification types, andrecord label information as sample data. The label information may beinformation manually labeled on the notifications.

S2. Respectively extract features (jump information and textinformation) of various sample data, divide values of fields in the textinformation into several characters, and combine the several charactersthrough vectorization, to obtain a text information eigenvector. Forexample, a packet name of xxx.yyy.zzz is resolved into a field ofzzz,yyy,zzz, and vectorized by using an encoding technology (such asonehot encoding); and the text information is divided into several keyphrases and/or keywords, and the several key phrases and/or keywords arevectorized and combined, to obtain a text information eigenvector.

S3. Generate a jump classification model by using a classificationalgorithm (such as a logistic regression, a linear vector machine, or agradient boosted decision tree, GBDT) and based on the jump informationeigenvector corresponding to the sample data and a labeled notificationtype, and generate a jump classification model by using a classificationalgorithm GBDT) and based on the jump information eigenvectorcorresponding to the sample data and a labeled notification type.

S4. Generate a fusion model by using a classification algorithm andbased on a first category output by the jump classification model, thesecond category output by a text classification model, and the labelednotification type.

Data volume of an application continually increases. Therefore, newnotification samples need to be added in a timely manner to update theclassification models and the rule repository. For specific details,refer to FIG. 7. FIG. 7 is a flowchart of a case in which a serverupdates the classification models and the rule repository. An updatingprocedure specifically includes the following operations.

The server obtains any notification (a target notification) sent by anewly added application. If a notification type of the targetnotification may be determined according to a rule in the rulerepository, the server adds the target notification as sample data afterlabeling the target notification with a corresponding notification type.If a notification type of the target notification cannot be determinedaccording to a rule in the rule repository, the server obtains, by usingthe classification models, a notification type (assuming as anotification type A) to which the target notification belongs.

The server obtains notifications sent by a large quantity of newly addedapplications. For various notifications, the terminal performshigh-dimensional clustering on the notifications based on the jumpinformation eigenvector and the text information eigenvector, anddivides the notifications into several types. A cluster categorycorresponding to each type, that is, a notification type correspondingto each type, is manually labeled.

The server determines jump information eigenvector and text informationeigenvector that are of the target notification, and similarity betweenthe target notification and various cluster categories, and determines acluster category having highest similarity as the notification type(assuming as a notification type B) to which the target notificationbelongs.

If the notification type A is the same as the notification type B, theserver uses the target notification as sample data. If the notificationtype A is different from the notification type B, the notification typeto which the target notification belongs is manually inspected, and theserver adds the target notification as sample data after the targetnotification is labeled with a corresponding notification type.

The described “adding the target notification as sample data” in theforegoing updating procedure means that a notification labeled with acorresponding notification type is input into the server as sample datathat generates a rule and classification models, and the server updatesthe rule and the classification models.

In addition to the foregoing updating manner described in FIG. 7, theserver may further perform updating based on a feedback sent by a userby using a terminal. Specifically, FIG. 8 is a flowchart of that aserver updates classification models and a rule repository. An updatingprocedure specifically includes the following operations:

A terminal determines a notification type (assuming as a notificationtype C) of a notification based on classification models or a rule inthe rule repository. A user performs feedback on the classificationresult, and if the user feeds back that the result has an error, theterminal reports the error to a server.

The server counts, based on errors reported by various terminals, errortimes corresponding to each notification. If counted error times reach athreshold, the server calculates jump information eigenvector and textinformation eigenvector that are of a notification, and similaritybetween the notification and various cluster categories, and determinesa cluster category having highest similarity as the notification type(assuming as a notification type D) to which the notification belongs.

If the server determines that the notification type C is the same as thenotification type D, whether a category of the notification is incorrectis manually inspected. That is, whether the notification belongs to thenotification type C (the notification type D) is manually determined. Ifthe incorrect category of the notification is manually inspected andfound, the notification type to which the notification belongs islabeled again, and the notification after being labeled again is enteredas sample data to the server. The server updates the rule and theclassification models.

404. The terminal displays a notification corresponding to theto-be-notified event by classification.

Display mode I: The terminal displays a notification of a samenotification type in a same display pane in a centralized manner.

Specifically, the terminal may perform displaying in various displaypanes in any one of the following manners.

Display mode 1: Display various notifications in corresponding displaypanes in expanded form.

In an optional manner, the various notifications in correspondingdisplay panes may be sorted in a descending sequence in phrases ofobtaining time.

The following uses an actual scenario as an example for description.

Scenario C: A terminal obtains a notification 9033 sent by an “Arena ofValor” 5 hours ago, a notification 9032 sent by a “Ele.me” 2 hours ago,a notification 9023 sent by a “Tencent News” and a notification 9013sent by a “Security Center” 1 hour ago, a notification 9022 sent by a“Sina News” 10 minutes ago, a notification 9031 sent by a “JingdongMall” 7 minutes ago, a notification 9012 sent by a “SmartCare” 5 minutesago, and a notification 9011 sent by a “Phone Manager” and anotification 9021 sent by a “Today's Headline” 1 minute ago. Theterminal determines that a notification type to which the 9011, 9012,and 9013 belong is a “smart notification”, a notification type to whichthe 9021, 9022, and 9023 belong is a “content information”, and anotification type to which the 9031, 9032, and 9033 belong is an“advertisement promotion”.

The terminal displays notifications of a same notification type in apane in a centralized manner, that is, displays the 9011, 9012, and 9012in a pane 901 in a centralized manner, displays the 9021, 9022, and 9023in a pane 902 in a centralized manner, and displays the 9031, 9032, and9033 in a pane 903 in a centralized manner, and displays notificationsin various panes in the foregoing display mode 1, as shown in FIG. 9A.

Display mode 2: Display a notification in a corresponding display panebased on a display mode corresponding to a priority of the notification.

Specifically, for any notification, the terminal obtains a priority ofthe notification, and determines a display mode of the notification in acorresponding display pane based on the priority. The display modeincludes: displaying in a first mode or displaying in a second mode,where text content displayed in the first mode is more than text contentdisplayed in the second mode.

Optionally, in some embodiments, displaying in the first mode may meandisplaying in expanded form or fully displaying, the displaying inexpanded form means that a part or all of text information of anotification is displayed in expanded form, and the fully displayingmeans that full text information of a notification is displayed, or textin text information of a notification is displayed. Displaying in thesecond mode may mean displaying in collapsed form or briefly displaying,the displaying in collapsed form means that text information of anotification is hidden and displayed in one message that indicates aquantity of collapsed notification, or text information of only onenotification is displayed and text information of other notifications ishidden, and the briefly displaying means that a digest of textinformation of a notification, or a title of a notification, or anotherpiece of brief content extracted from text information, is displayed.

Optionally, in some embodiments, when the terminal displays anotification in the second mode the terminal displays the notificationin the first mode in response to detecting an entered operationperformed on the notification.

In this embodiment of this application, the priority of the notificationis used to identify the notification as an important notification or anunimportant notification. Specifically, that the terminal determines adisplay mode of the notification in a corresponding display pane basedon the priority includes: displaying an important notification in thefirst mode in a corresponding pane, and displaying an unimportantnotification in the second mode in a corresponding pane.

In some embodiments, a priority of a notification may be determinedbased on priority information. The priority information may at leastinclude as follows: first priority information corresponding to anotification type, second priority information of an applicationcorresponding to a notification, and user usage habit informationcorresponding to the notification. The following respectively describesthe information in detail.

(1) First Priority Information Corresponding to a Notification Type

The first priority information corresponding to a notification type isused to identify a priority of the notification type. The priority ofthe notification type is preset by operating and maintenance personnelbased on a service requirement. In a possible design, the priority maybe modified based on a click frequency and/or a delete frequency from auser on the notification type. Specifically, a priority of anotification type having a corresponding click frequency greater than apreset value is modified to be higher, and a priority of a notificationtype having a corresponding delete frequency greater than a preset valueis modified to be lower. In another possible design, the priority may bemanually modified by a user on the terminal.

Specifically, in a possible design, when based on a service requirement,a priority corresponding to an important notification type is set to behigh, a priority corresponding to an unimportant notification type isset to be low, and the first priority information is used to identifythe priority of the notification type as high or low.

That the terminal determines a priority of a notification based on firstpriority information corresponding to a notification type specificallyincludes: if the first priority information corresponding to thenotification type to which the notification belongs indicates that thepriority of the notification type is high, determining that the priorityof the notification is high, and displaying the notification in acorresponding pane in the first mode; or if the first priorityinformation corresponding to the notification type to which thenotification belongs indicates that the priority of the notificationtype is low, determining that the priority of the notification is low,displaying the notification in a corresponding pane in the second mode,and when detecting an expanded operation entered by a user for thenotification, displaying, by the terminal, the notification in thesecond mode.

The foregoing scenario C is used as an example. In the terminal, apriority corresponding to the notification type “smart notification” ishigh (first priority information), and priorities corresponding to thenotification type “advertisement promotion” and “content information”are low (first priority information). The terminal displaysnotifications in the notification type “smart notification” subsequentlyin expanded form (in the first mode), performs sorting based on adescending sequence in phrases of obtaining time, and displaysnotifications in the notification type “content information” and“advertisement promotion” in collapsed form (in the second mode), asshown in FIG. 9B. A user taps “tap to unfold” (unfold operation) in thepane 902 on a display interface corresponding to FIG. 9B. The terminalresponds to the instruction, and displays notifications in the pane 902in expanded form (in the second mode), as shown in FIG. 9C-1 and FIG.9C-2.

(2) Second Priority Information of an Application Corresponding to theNotification

The second priority information is used to identify a priority of anapplication. The priority may be manually set by a user on a terminal,or the priority may be determined by the terminal based on operationdata of a user on the application.

In a possible design, the priority of the application is divided intotwo levels: high and low. If times of a user tapping an icon of anapplication on a desktop exceed preset times, or an accumulated durationof a user using an application exceeds a preset duration, a priority ofthe application is high, or if a duration in which a user does not usean application exceeds a preset duration, a priority of the applicationis low. That the terminal determines a priority of a notification basedon second priority information corresponding to an application to whichthe notification belongs specifically includes: if the second priorityinformation corresponding to the application to which the notificationbelongs indicates that the priority of the application is high,determining that the priority of the notification is high, anddisplaying the notification in a corresponding pane in the first mode;or if the second priority information corresponding to the applicationto which the notification belongs indicates that the priority of theapplication is low, determining that the priority of the notification islow, displaying the notification in a corresponding pane in the secondmode, and when detecting an expanded operation entered by a user for thenotification, displaying, by the terminal, the notification in thesecond mode.

(3) User Usage Habit Information Corresponding to the Notification

In this embodiment of this application, user usage habit information mayinclude at least one of the following: user historical notificationtapping frequency information, user historical notification deletionfrequency information, user profile information, user habit settinginformation.

The user profile information is provided by a user profile platform. Theuser profile information specifically may perform listening generationby using an entered operation (such as, a tap operation, a searchoperation, or a browsing operation), used to indicate user preference,of a user on the terminal.

In a possible embodiment, that the terminal determines a priority of anotification based on user usage habit information corresponding to thenotification specifically includes: if text information of thenotification matches user profile information, determining that thepriority of the notification is high, and displaying the notification inthe second mode.

The foregoing scenario C is used as an example. In the terminal, apriority corresponding to the notification type “smart notification” ishigh (first priority information), and priorities corresponding to thenotification type “advertisement promotion” and “content information”are low (first priority information). If a user usually browsesentertainment category news, the user profile platform adds an“entertainment gossip” on user profile information based on suchbehavior. If the user further enjoys playing a game of “Arena of Valor”and usually uses the application of “Arena of Valor”, the user profileplatform adds an “Arena of Valor” on the user profile information basedon such behavior. The notification 9033 matches “Arena of Valor”, andthe notification 9023 matches “entertainment gossip”, so that theterminal determines that priorities of the two notifications are high,displays the two notifications in their corresponding panes in expandedform, and displays the remaining notifications in their correspondingpanes based on priorities that are respectively of the remainingnotifications and that are determined based on the first priorityinformation, as shown in FIG. 9D.

In a possible embodiment, that the terminal determines a priority of anotification based on user usage habit information corresponding to thenotification specifically includes: if text information of thenotification does not match user profile information, determining thatthe priority of the notification is low, displaying the notification ina corresponding pane in the second mode, and when detecting an expandedoperation entered by the user for the notification, displaying, by theterminal, the notification in the first mode.

The user historical notification deletion frequency information isinformation obtained by the terminal through counting tap deleteoperations performed by the user for a notification historically. Thetap delete operation means a delete operation performed by the user fora notification.

In a possible embodiment, that the terminal determines the priority ofthe notification based on the user usage habit information correspondingto the notification specifically includes: if times of the user tappingto delete a notification that belongs to a notification type and that issent by an application (user historical notification deletion frequencyinformation) exceed preset times, determining that a priority of thenotification that belongs to the notification type and that is sent bythe application is low, displaying the notification in a correspondingpane in the second mode, and when detecting an expanded operationentered by the user for the notification, displaying the notification inthe first mode.

The foregoing scenario C is used as an example. In the terminal, apriority corresponding to the notification type “smart notification” ishigh (first priority information), and priorities corresponding to thenotification type “advertisement promotion” and “content information”are low (first priority information). Before obtaining the notification9013, the user taps to delete a notification of the “smart notification”category sent by a “Security Center” for 6 times, exceeding 5 times(preset times). The terminal determines, based on the user historicalnotification deletion frequency information, that a priority of thenotification 9013 that is sent by the “Security Center” and that is inthe pane 901 corresponding to the “Smart notification” is low, displaysthe notification in collapsed form, and displays the remainingnotifications in their corresponding panes based on priorities that arerespectively of the remaining notifications and that are determinedbased on the first priority information, as shown in FIG. 9E.

In a possible embodiment, each notification type may include severalnotification subtypes. That the terminal determines the priority of thenotification based on the user usage habit information corresponding tothe notification specifically includes: if times of the user tapping todelete a notification of a notification subtype (user historicalnotification deletion frequency information) exceed a preset value,determining that a priority of the notification belonging to thenotification subtype is low, displaying the notification in acorresponding pane in the second mode, and when detecting an expandedoperation entered by the user for the notification, displaying thenotification in the first mode.

For example, the notification type “smart notification” includes thefollowing notification subtypes: a “phone electricity quantity”, a “callblock”, and “other”. The foregoing scenario C is used as an example. Inthe terminal, an identifier corresponding to the notification type“smart notification” is important (first priority information), andidentifiers corresponding to the notification type “advertisementpromotion” and “content information” are both “unimportant” (firstpriority information). Before obtaining the notification 9011, times ofthe user tapping to delete a notification about phone electricityquantity (notification subtype) notification exceeds 5 times (a presetvalue), and the terminal determines, based on the user historicalnotification deletion frequency information, that a priority of thenotification 9011 belonging to the notification subtype is low, displaysthe notification 9011 in collapsed form, and displays the remainingnotifications in their corresponding panes based on priorities that arerespectively of the remaining notifications and that are determinedbased on the first priority information, as shown in FIG. 9F.

The user historical notification tapping frequency information isinformation obtained by the terminal through counting tapping andenabling operations performed by the user for a notificationhistorically. The tapping and enabling operation means an operation inwhich a jump interface corresponding to a notification is enteredthrough tapping the notification.

In a possible embodiment, that the terminal determines the priority ofthe notification based on the user usage habit information correspondingto the notification specifically includes: if times of the user tappingand enabling a notification that belongs to a notification type and thatis sent by an application (user historical notification tappingfrequency information) exceed preset times, determining that a priorityof the notification that belongs to the notification type and that issent by the application is high, displaying the notification in acorresponding pane in the second mode.

In a possible embodiment, each notification type may include severalnotification subtypes. That the terminal determines the priority of thenotification based on the user usage habit information corresponding tothe notification specifically includes: if times of the user tapping andenabling a notification of a notification subtype (user historicalnotification tapping frequency information) exceed a preset value,determining that a priority of the notification belonging to thenotification subtype is low, displaying the notification in acorresponding pane in the second mode, and when detecting an expandedoperation entered by the user for the notification, displaying thenotification in the first mode. In a possible design, differentinformation included in the user usage habit information corresponds todifferent habit priorities. If the terminal determines a priority of anotification as a first priority based on first information, anddetermines a priority of a notification as a second priority based onthe second information. When the first priority is different from thesecond priority, the terminal uses, in priority, a priority of anotification determined based on information having a higher habitpriority. That is, if a habit priority of the first information ishigher than that of the second information, the terminal determines thatthe priority of the notification is the first priority. If a habitpriority of the second information is higher than that of the firstinformation, the terminal determines that the priority of thenotification is the second priority.

The user habit setting information means habit information set by theuser on the terminal. Specifically, the user may set habit informationin the following manners: The user enters operations for a targetnotification on a notification display interface. The terminal respondsto the operation, and displays habit setting prompt information. Theuser inputs a corresponding instruction based on the setting promptinformation. The terminal responds to the instruction, and determinesthat a priority of a notification of a notification type (a notificationtype to which the target notification belongs) corresponding to thetarget notification and corresponding to target application package nameinformation (application package name information corresponding to thetarget notification) is low.

As shown in FIG. 9G-1, FIG. 9G-2, and FIG. 9G-3, the user touches andholds a notification sent by the “Security Center” in a display panecorresponding to the smart notification on the notification displayinterface. The terminal responds to the operation. The terminal promptsthe user whether a notification that belongs to the “smart notification”category and that is sent by the “Security Center” needs to be blocked.If the user taps “Yes”, when receiving a notification that belongs tothe “smart notification” category and of which application package nameinformation is the “Security Center”, the terminal determines that apriority of the notification is low. In the foregoing scenario C, thenotification 9013 matches the habit information, so that a prioritycorresponding to the notification 9013 is low, and the terminal displaysthe notification in collapsed form, as shown in FIG. 9H.

It should be understood that, apart from that the user may enterspecific operation setting habit information on the notification displayinterface, the user may further set habit information in anotherinterface, such as a system setting interface, and this is notspecifically limited in this application.

Display mode II. Display all notifications that have priorities as afirst priority and that belong to a same notification type in a displaypane in a centralized manner in the first mode, and display allnotifications that have priorities as a second priority in a displaypane in a centralized manner in the second mode.

In this embodiment, a priority means a priority of a notification, andthe first priority is higher than the second priority. A priority of anotification may be specifically determined based on priorityinformation of the notification.

The following uses an example for description. In the terminal, apriority corresponding to the notification type “smart notification” ishigh (first priority information), and priorities corresponding to thenotification type “advertisement promotion” and “content information”are low (first priority information). The terminal generates the userprofile information “entertainment gossip” and “Arena of Valor” based onuser usage habits. In the foregoing scenario C, the notification 9033matches the “Arena of Valor”, and the notification 9023 matches the“entertainment gossip”. The terminal determines, based on the userprofile information, that priorities of the two notifications are high,and determines priorities of other notifications based on the firstpriority information. The terminal displays notifications that belong toa same notification type and that have a “high” priority in a pane in acentralized manner in expanded form, and displays all notifications thathave a “low” priority in a pane in a centralized manner in collapsedform. That is, the terminal displays the 9011, 9012, and 9013 in thepane 901 in a centralized manner in expanded form, displays the 9023 inthe pane 902 in expanded form, displays the 9033 in the pane 903 inexpanded form, and displays the 9021, 9022, 9031, and 9032 in the pane904 in a centralized manner in collapsed form, as shown in FIG. 9I.Display mode III. Display notifications corresponding to to-be-notifiedevents having same application package name information in a displaypane in a centralized manner, display all notifications that havepriorities as the first priority and that are in the display pane in thefirst mode, and display all notifications that have priorities as thesecond priority and that are in the display pane in the second mode.

In this embodiment, a priority means a priority of a notification, andthe first priority is higher than the second priority.

In some embodiments, a priority of a notification may be specificallydetermined based on first priority information of a notification type.

The following uses a specific application scenario as an example fordescription.

Scenario D: The terminal obtains a notification 1031 and a notification1032 that are sent by an application “Ele.me” respectively 3 hours agoand 2 hours ago, and obtains notifications 1021 and 1022 that are sentby a “Today's Headline” respectively 1 hour ago and 1 minute ago. Theuser enables “Kugou Music” and plays a song “Honey” by using theapplication 5 minutes ago. In this case, the terminal obtains a displaynotification 1011 generated by the “Kugou Music”, and a notification1012 pushed by the “Kugou Music”. The terminal determines, based on themanner described in operation 402 or operation 403 in the embodimentcorresponding to FIG. 4, that a notification type to which the 1031,1032, 1012 belong is an “advertisement promotion”, a notification typeto which the 1021 and 1022 belong is a “content information”, and anotification type to which the 1011 belongs is a “music playing”.Priorities corresponding to the “content information” and “advertisementpromotion” are “low” (first priority information), a prioritycorresponding to the “music playing” is high (first priorityinformation).

The terminal displays the notifications 1031 and 1032 sent by the“Ele.me” in a pane 103 in a centralized manner. Notification types towhich the two notifications belong are both the “advertisementpromotion”. The terminal determines, based on first priority informationof the two notifications, that priorities of the two notifications are“low”, so that the terminal displays the two notifications in the pane103 in collapsed form. The terminal displays the notifications 1011 and1012 sent by the “Kugou Music” in a pane 101 in a centralized manner. Anotification type to which the notification 1011 belongs is the “musicplaying”. The terminal determines, based on first priority informationof the notification, that a priority of the notification is “high”, sothat the terminal displays the notification in the pane 101 in expandedform. A notification type to which the notification 1012 belongs is the“advertisement promotion”. The terminal determines that a priority ofthe notification is “low”, so that the terminal displays thenotification in the pane 101 in collapsed form. The terminal displaysthe notifications 1021 and 1022 sent by the “Today's Headline” in a pane102 in a centralized manner. Notification types to which the twonotifications belong are both the “content information”. The terminaldetermines, based on first priority information of the notifications,that priorities of the notifications are “low”, so that the terminalalways displays the notifications in the pane 102 in collapsed form. Afinal display result is shown in FIG. 10A.

A user taps “tap to unfold” in the pane 102 on a display interface shownin FIG. 10A. The terminal responds to the instruction, and displayshidden notifications 1021 and 1022 in the pane 102 in expanded form, asshown in FIG. 10B-1 and FIG. 10B-2.

In some embodiments, a priority of a notification may further bespecifically determined based on user habit information.

The scenario D is used as an example. The user usually browsesentertainment category news on the terminal, and the terminal adds,based on the behavior, “entertainment gossip” as a profile tag (userprofile information) corresponding to the user. The notification 1021matches the profile tag. The terminal determines that a priority of thenotification 1021 is high, so that the terminal displays thenotification in a pane 1012 in expanded form, and displays the remainingnotifications in their corresponding panes of which priorities aredetermined based on first priority information of the remainingnotifications (as shown in foregoing FIG. 10A). A final display resultis shown in FIG. 10C.

Display mode IV. Display all notifications that have priorities as thefirst priority and that have same application package name informationin a display pane in a centralized manner in the first mode, and displayall notifications that have priorities as the second priority and thathave same application package name information in a display pane in acentralized manner in the second mode.

In some embodiments, a priority of a notification may be specificallydetermined based on first priority information of a notification type.

The scenario D is used as an example. The terminal displays thenotification 1011 that is sent by the “Kugou Music” and that is of anotification type having a “high” priority in the pane 101 in expandedform, and displays the notification 1012 that is sent by the “KugouMusic” and that is of a notification type having a “low” priority in thepane 103 in collapsed form. The terminal displays the notifications 1021and 1022 that are sent by the “Today's Headline” and that are of anotification type having a “low” priority in a centralized manner in thepane 102 in collapsed form. The terminal displays the notifications 1031and 1032 that are sent by the “Ele.me” and that are of a notificationtype having a “low” priority in a centralized manner in the pane 104 incollapsed form. A final display result is shown in FIG. 10D.

In some embodiments, a priority of a notification may further bespecifically determined based on user habit information.

The scenario D is used as an example. The user usually browsesentertainment category news on the terminal, and the terminal adds,based on the behavior, “entertainment gossip” as a profile tag (userprofile information) corresponding to the user. The notification 1021matches the profile tag. A priority of the notification 1021 is high,and important levels of the remaining notifications are consistent withpriorities of notification types to which the remaining notificationsbelong. The terminal displays the notification 1011 that is sent by the“Kugou Music” and that has a “high” priority in the pane 101 in expandedform, and displays the notification 1012 that is sent by the “KugouMusic” and that has a “low” priority in the pane 104 in collapsed form.The terminal displays the notification 1021 that is sent by the “Today'sHeadline” and that has a “high” priority in the pane 102 in expandedform, and displays the notification 1022 that has a “low” priority inthe pane 103 in collapsed form. The terminal displays the notifications1031 and 1032 that are sent by the “Ele.me” and that have “low”priorities in a centralized manner in the pane 105 in collapsed form. Afinal display result is shown in FIG. 10E.

Display mode V. Display all notifications that have priorities as thefirst priority and that have same application package name informationin a pane in a centralized manner in expanded form, and display allnotifications that have priorities as the second priority in a pane in acentralized manner in collapsed form.

In this embodiment, a priority means a priority of a notification, andthe first priority is higher than the second priority.

In some embodiments, a priority of a notification may be specificallydetermined based on first priority information of a notification type.

The scenario D is used as an example. In the scenario D, only a priorityof a notification type to which the notification 1011 sent by “KugouMusic” belongs is “high”. The terminal displays the notification 1021 inthe pane 101 in expanded form, and displays the remaining fivenotifications in the pane 102 in collapsed form, as shown in FIG. 10F.

In some embodiments, a priority of a notification may further bespecifically determined based on user habit information.

The scenario D is used as an example. The user usually browsesentertainment category news on the terminal, and the terminal adds,based on the behavior, “entertainment gossip” as a profile tag (userprofile information) corresponding to the user. The notification 1021matches the profile tag. The terminal determines that a priority of thenotification 1021 is high, and priorities of the remaining notificationsare consistent with priorities of notification types to which theremaining notifications belong. The terminal displays the notification1011 that is sent by the “Kugou Music” and that has a “high” priority inthe pane 101 in expanded form. The terminal displays the notification1021 that is sent by the “Today's Headline” and that has a “high”priority in the pane 102 in expanded form, and displays the remainingfour notifications that have “low” priorities in a centralized manner inthe pane 103 in collapsed form. A final display result is shown in FIG.10G.

Optionally, in some embodiments, a whitelist may be stored in theterminal in advance. When there is a to-be-notified event, if thewhitelist includes application package name information of theto-be-notified event, the terminal may directly display the notificationinstead of matching a notification type to which a notificationcorresponding to the to-be-notified event belongs. If the whitelist doesnot include application packet name information of the to-be-notifiedevent, the terminal determines, based on the manners described in theforegoing operations 402 and 403, a notification type to which anotification corresponding to the to-be-notified event belongs.

Optionally, in some embodiments, when there is a to-be-notified event,if an application corresponding to application package name informationof the to-be-notified event is a system application, the terminal maydirectly display the notification instead of matching a notificationtype of a notification corresponding to the to-be-notified event. If anapplication corresponding to application package name information of theto-be-notified event is not a system application, the terminal maydetermine, based on the manners described in the foregoing operations402 and 403, a notification type to which the notification belongs.

Optionally, in some embodiments, after determining a notification typeto which a notification corresponding to the to-be-notified eventbelongs, if a priority of the notification type is a lowest level, theterminal may not send a notification to the user for the notification.The notification specifically may include at least one of the following:ring, vibration, and flash. In addition, the terminal may further usethe following one or more operations for the notification.

1. When being in a lock status, the terminal does not display thenotification on a lock screen interface.

2. When being in an unlock status, the terminal does not display thenotification on a current interface.

3. After obtaining an instruction to invoke a notification bar, theterminal does not display the notification in the notification bar.

Optionally, in some embodiments, the user may set whether to enable a“smart categorization” on the terminal. If the user enables the “smartcategorization”, the terminal determines a notification type to which anotification belongs in a manner corresponding to the foregoing FIG. 4.If the user does not enable the “smart categorization”, the terminaldetermines a notification type to which a notification belongs in adefault manner, for example, performs categorization based onapplication package name information of the notification, and eachapplication corresponds to a notification type. Specifically, on theterminal, the user may enable the “smart categorization” by tapping ashortcut key in a Status Bar, or may enable the “smart categorization”by tapping a control that is in a notification setting interface andthat corresponds to the “smart categorization”.

As shown in FIG. 11A-1, FIG. 11A-2, FIG. 11A-3, and FIG. 11A-4, the usertaps “notification” in a system setting interface of the terminal. Theterminal responds to the instruction, and displays a notificationsetting interface. The interface includes a button that enables/disablesthe “smart categorization”. The user taps the button. The terminalresponds to the instruction, enables the “smart categorization”, anddetermines, for an obtained notification, a notification type to whichthe notification belongs in the manner corresponding to the foregoingFIG. 4. For various applications, the user may further set in thenotification setting interface whether to receive a notification sent byan application. For an application whose notification is set as “not toreceive”, the terminal does not obtain a notification sent by theapplication.

Optionally, in some embodiments, for various notification types, theuser may set on the terminal a display mode corresponding to anotification type. After determining a notification type to which anotification belongs, the terminal may display an obtained notificationbased on the display mode set by a user.

As shown in FIG. 11B-1 and FIG. 11B-2, a user taps an “advanced setting”in a notification setting interface of a terminal. The terminal displaysan advanced setting interface. The user taps an “advertisementpromotion” in the advanced setting interface. The terminal displays adisplay interface corresponding to the “advertisement promotion”. Theuser sets a display mode corresponding to a notification that belongs tothe “advertisement promotion” in the setting interface. According to acorresponding setting in FIG. 11B-1 and FIG. 11B-2, after obtaining anotification that belongs to the “advertisement promotion”, the terminaldoes not display the notification in an ejection pane on the top of ascreen, nor display the notification on a locked screen. When obtainingan instruction to invoke a notification bar, the terminal displays textinformation of the notification in the notification bar in expandedform.

It should be noted that, a rule repository may be stored in a ruleplatform of a terminal. In an optional manner, the rule platform of theterminal may match matching information against rules in the rulerepository. That is, the rule platform may perform operation 402. In anoptional manner, the terminal may invoke an algorithm platform to load aclassification model, and may analyze feature information by using theclassification model. That is, the algorithm platform may performoperation 403.

In one embodiment of this application, when there is a to-be-notifiedevent, a terminal extracts matching information or feature informationof the to-be-notified event, obtains a notification type by matching thematching information with the rules in the rule repository, or obtain anotification type by analyzing the feature information by using aclassification model. The rules in the rule repository and theclassification model are determined based on a large amount of sampledata that is manually labeled with the notification types, so thataccurate classification of notifications may be achieved to meetrequirements of users, to help the users to screen out notifications ofinterest, thereby improving user experience.

Then, the rule and the classification model in the embodiments of thisapplication may be updated based on a market requirement or userfeedback in a timely manner, to improve the flexibility of the solution.

Then, in the embodiments of this application, a plurality of manners inwhich features are displayed by classification are provided, to improvethe flexibility of the solution.

The notification display method in this application is described in thefollowing with a specific scenario embodiment.

(1) The Technical Problems to be Solved in this Embodiment are asFollows:

Coverage of notification classification reaches 100% in a manner ofcombining a rule and a model, thereby improving accuracy of notificationclassification; and importance of notifications is intelligently sortedwith reference to a user profile.

(2) Service Scenarios Applicable to this Embodiment are as Follows:

Automatic classification of notification: for example, automaticcollapse of an unimportant notification group such as advertisingpromotion and content information is supported, as shown in FIG. 12A.

Classification of notification importance: based on automaticclassification, the notification classification is mapped to importantor unimportant, and unimportant notification may be collapsedautomatically, as shown in FIG. 12B.

Personalized classification of notification priority: the importance ofa notification is automatically modified based on an operation oftapping a notification. For example, when a user taps and deletesnotifications of one application for M times, notifications of theapplication are degraded to unimportant (automatically collapsed); whena user taps notifications of one application for multiple times,notifications of the application are upgraded to important (do notcollapse). For example, in FIG. 12C-1 and FIG. 12C-2: deletenotifications of intercepting spam calls, and such types ofnotifications are collapsed.

Notification types are automatically classified and sorted based on auser profile. For example, if a user usually browses entertainment news,when news notifications are received, only entertainment newsnotifications are expanded, and other types of notifications arecollapsed; and if a user likes to play Arena of Valor, receivednotifications of Arena of Valor are presented, as shown in FIG. 12D-1and FIG. 12D-2. The user profile is generated based on historicalbehavior of recorded usages of a mobile phone.

(3) Implementations of this Embodiment are as Follows:

Notification classifications are classified into an onlineclassification module and an offline training module. The onlineclassification module is configured to intelligently sort, in a mobileterminal, received notifications. The offline training module isconfigured to maintain and update notification classification rules andmodels on a cloud side.

FIG. 12E is a flowchart of notification classification on a mobileterminal side, implementation operations of intelligent classificationof notifications are as follows:

Operation 1: When receiving a notification, the mobile terminal firstuses a rule to match against a notification type. If an existingclassification rule can match the notification, the type of thenotification is returned directly. If no rule can match thenotification, the notification is classified by using a model.

Rule definition: summarized classification rules such as objectinformation, for example, keyword isOngoing in a notification object,and Action keyword, Component keyword, Class keyword and uriStringkeyword in an Intent object are used. For example,Action=xxx.yyy.zzz.BackgroundConsumeActivity, the notification can beliterally understood as a notification of background power consumption.Those key fields determine which interface is jumped to after tapping anotification.

Rule generation: when a plurality of notifications with different textsthat are sent by an application are labeled as a same type, andnotifications of the same type have a same Action field value, Classfield value or uriString field value, this type of notification may besummarized according to a rule of jump information.

Examples of jump information are shown in FIG. 12F.

A sample of a jump information rule: rules from a same application butwith different jump information may be summarized as classificationrules of different types, as shown in FIG. 12G.

Operation 2: A first operation of using model classification is to fetchfeatures of the notification. In this embodiment, a jump informationfeature and a text content feature that are of the notification arerespectively fetched. By extracting each field content of jumpinformation of the notification, the jump information feature vectorizesand combines the related field content and generates a jump informationeigenvector (for example, a package name xxx.yyy.zzz is decomposed to anxxx,yyy field and a zzz field, and then is vectorized by using a codingtechnology (for example, onehot coding)). The text information featuregenerates an eigenvector of the text information by extracting a wordvector or a character vector.

Operation 3: Use an offline pre-trained jump information model topredict, based on the jump information feature generated in operation 2,the notification according to a classification intermediate result ofthe jump feature. Moreover, an offline pre-trained text informationmodel is used to predict, based on the text classification modelgenerated in operation 2, the notification according to a classificationintermediate result of the text information.

Operation 4: Use an offline pre-trained fusion model to predict a finalclassification result based on the classification intermediate values ofthe jump information and the text information that are generated inoperation 3.

FIG. 12H is a flowchart of offline notification classification modeltraining. The operations are as follows:

Operation 1: Collect notification sample data, and manually label,according to service requirements, a notification sample as trainingdata.

Operation 2: Extract a notification sample feature, which is the same asthe classification procedure in operation 2.

Operation 3: Use a classification algorithm (for example, a logisticregression, or a linear vector machine, and a GBDT) to generate aclassification model according to jump information and a classificationmodel according to text information based on the label of notificationsample data.

Operation 4: Use intermediate results generated by a jump model and atext model to train a fusion model. Because a quantity of applicationsincrease constantly, a new notification sample needs to be added in timeto update and iterate an existing classification rule and model. Higheroperation and maintenance costs are required by only using a manualmethod, so FIG. 12I shows a semi-automatic offline new sample addedprocess to reduce manual costs of operation and maintenance. Operationsare as follows:

Operation 1: When a received new notification sample performs aprocedure which is the same as that of notification classification on amobile terminal side to obtain a notification classification 1, and ifthe new notification sample has already matched a rule, the newnotification sample is directly added as a new sample in a notificationsample library.

A full sample of a notification is used to extract a notificationeigenvector (the operation is the same as operation 2 of the mobileterminal classification)). The full sample of the notification isperformed high-dimensional clustering based on the notificationeigenvector (a quantity of clustering types can be defined based on anotification type defined by a service). After clustering, a clusteringtype is labeled based on a sample label.

Operation 2: Calculate a similarity between the eigenvector of the newnotification sample and each classification after clustering to obtain anew sample notification type 2.

Operation 3: Compare the new sample notification classification 1 andthe new sample notification type 2. If the new sample notification type1 is equal to the new sample notification type 2, the new notificationsample is automatically labeled as a corresponding notificationclassification and is added as a new sample in the notification samplelibrary. If the new sample notification type 1 is not equal to the newsample notification type 2, the new sample type is manually inspectedand added to the new sample in the notification sample library.

The notification classification rule and model require not only newsamples to iterate, but also user feedback for modification of theclassification rule and the model. FIG. 12J is a flowchart ofclassification feedback mechanism. Operations are as follows:

Operation 1: For a notification that intelligent classification iscompleted on a mobile terminal side, if a user feedback result is thatthe classification is not correct, the notification data and the userfeedback result requires to be reported.

Operation 2: A server end collects whether feedback statistics ofrelated notification classification errors reach a threshold required tobe re-inspected.

Operation 3: If the statistical data in operation 2 reaches thethreshold, the new sample is first used to add operation 1 described inthe procedure to perform automatic classification of the notification.

Operation 4: If the automatic inspection fails to find an error,confirmation is further made through manual inspection.

Operation 5: If manual inspection confirms that there is aclassification error, a related notification rule is updated or anotification classification model is updated.

After the notification is automatically classified on the mobileterminal side, display priority sorting is performed on the notificationaccording to a persona of a local user. FIG. 12K shows a personalizedsorting procedure of notification types. Operations are as follows:

Operation 1: Obtain the notification type and a local user profile (auser profile tag and user usage historical data).

Operation 2: If the notification type is in consistent with the userprofile label, for example, if the user profile tag labels the user as amilitary fan, and the notification type is the military notification,the notification type matches the user profile tag, and the notificationis set as a high priority display. For another example, if the userusually taps a type of notification of an application, the notificationmatches with the user profile, and the notification is set as a highpriority display. If the notification type does not match the userprofile, the display priority of the notification may be suitablydegraded.

(4) The Technical Solutions of the Embodiments of this ApplicationAchieve the Following Beneficial Effects:

An application abuse notification function is limited on the mobileterminal side, so that the possibility of harassing the user isrelatively low.

The notification type may be self-defined based on service requirements,which is convenient for subsequent services to perform differentprocessing according to different notification types, and helps to use aone-size-fits-all manner when clearing notifications.

There is no need to depend on a whitelist or a blacklist to filter thenotification;

The notification type can be automatically identified, and thenotification display priority can be dynamically adjusted based on theuser profile and the usage historical record of the user.

The notification rule definition and the model are semi-automaticallymaintained can reduce manual operation and maintenance costs.

An embodiment of this application further provides a notificationdisplay method, configured to help a user to quickly find out animportant notification, improving user experience. Referring to FIG. 13,another embodiment of the notification display method in the embodimentof this application includes:

1301. A terminal determines a notification type of a notificationcorresponding to a to-be-notified event; when there is a to-be-notifiedevent, the terminal determines the notification type corresponding tothe to-be-notified event.

It should be understood that, the to-be-notified event may include alocal notification event and a push notification event. The localnotification event is a notification event triggered by a localapplication, and is a notification form that is based on time behavior,for example, clock timing, and a to-do reminder. The push notificationevent is a notification event sent by an application service provider toan application client, that is, the notification event obtained by aterminal application, for example, an application update notification.

In one embodiment, the terminal may obtain matching information of theto-be-notified event, match the matching information against rules in arule repository, and determine the notification type corresponding tothe matching rule as the notification type of the notification. Specificmatching process is similar to operation 402 in an embodimentcorresponding to FIG. 4. Details are not described herein again.

In one embodiment, the terminal may obtain feature information of theto-be-notified event, analyze the feature information by using aclassification model, and use a notification type corresponding to theanalysis result as the notification type of the notification. Specificprocess of obtaining the feature information and process of analyzingthe feature information is similar to operation 403 in an embodimentcorresponding to FIG. 4. Details are not described herein again.

In one embodiment, the terminal may obtain application package nameinformation of the to-be-notified event, and determine the notificationtype to which the notification belongs based on the application packagename information. Specifically, notifications of the application packagename information are determined as notifications of the same type, thatis, each application corresponds to a notification type, or determinethe application type of the application based on the application packagename information and use the notification type to which the notificationbelongs as the application type.

In one embodiment, the terminal may obtain text information of theto-be-notified event, and determine the notification type to which thenotification belongs based on a keyword and/or a key phrase in the textinformation. Specifically, notifications that have the same keywordand/or key phrase are determined as notifications of the samenotification type.

In one embodiment, the terminal may obtain jump information of theto-be-notified event, and determine the notification type to which thenotification belongs based on the jump information. Specifically,notifications that have the same jump information are determined asnotifications of the same notification type.

The terminal may further perform notification classification by usinganother manner. This is not specifically limited in this embodiment.

1302. The terminal displays the notification by classification based onthe notification type.

After determining the notification type to which the notificationbelongs, the terminal displays the notification by classification basedon the notification type. Specifically, the terminal may centralizenotifications of the same notification type to one pane to display.

The following describes how notifications are displayed in thecorresponding pane.

Mode 1. Each notification is displayed in expanded form in thecorresponding display pane.

For each notification type, the terminal displays notifications of thesame notification type in expanded form which are centralized in thepane.

Mode 2. The notification is displayed in the corresponding display panebased on a display mode corresponding to a priority of the notification.

The terminal obtains the priority of the notification corresponding tothe to-be-notified event, determines a display mode of the notificationin the corresponding display pane based on the priority, and displaysthe notification based on the display mode. The display mode includes:displaying in expanded form or displaying in collapsed form in thecorresponding display pane; or displaying in a first mode or displayingin a second mode in the corresponding display pane, and contentdisplayed in the first mode is more than content displayed in the secondmode.

In one embodiment, the priority of the notification corresponding to theto-be-notified event may be determined based on priority information,where the priority information includes at least one of the following:first priority information corresponding to the notification type, firstpriority information of the application corresponding to thenotification, and user usage habit information corresponding to thenotification.

The terminal determines the priority of the notification based on thepriority information, the process of displaying based on the priority issimilar to content about the display mode 2 described in operation 404in an embodiment corresponding to FIG. 4. Details are not describedherein again.

In one embodiment, the priority of the notification corresponding to theto-be-notified event may be determined based on third priorityinformation set by an application service provider.

An actual application scenario is used for illustration in thefollowing:

Scenario E: a user is using “Baidu Maps” in the terminal for navigation.“Baidu Maps” sends a corresponding notification 1401. During navigation,the terminal obtains notifications 1402 and 1403 sent from “Baidu Maps”and a notification 1404 sent from “Today's Headline”.

The Android system defines notifications into five priorities: max,high, default, min, and none, and sets that the notification with thepriority “max” is displayed in expanded form, and notifications of theremaining four priorities are displayed in collapsed form. “Baidu Maps”defines the priority of the notification 1401 as “max”, and prioritiescorresponding to 1402 and 1403 are “default”; and “Shenzhen weather”defines the priority corresponding to 1404 as “high”.

The terminal classifies according to application package nameinformation of the notification, that is, classifies application packagename with the same information as one type. The terminal classifies1401, 1402 and 1403 as one type, and classifies 1404 as one type. Theterminal displays notification 1401 in expanded form in the pane 1410,centralizes and displays 1402 and 1403 in collapsed form in the pane1420 and displays the notification 1404 in collapsed form in the pane1430, as shown in FIG. 14.

In a possible embodiment, the terminal may further centralize allnotifications of the same notification type and that have a firstpriority to one pane, and centralize all notifications that have asecond priority to another pane. The priority means a priority of anotification, and the first priority is higher than the second priority.The terminal may specifically determine the priority of the notificationthrough priority information, and the specific determining process issimilar to the process described in operation 404 in the correspondingembodiment in FIG. 4. Details are not described herein again.

In one embodiment of this application, the terminal may set the priorityof the notification based on information such as user interests ofnotifications and may display the notification in different modes basedon the priority of the notification. Less content may be displayed forthe notification that has a relatively low priority, and more contentmay be displayed for the notification that has a high priority. In thiscase, the user may quickly find out notifications of interest on thenotification display interface, thereby improving search efficiency andimproving user experience. In addition, a plurality of modes ofdisplaying the classification are provided in the embodiment of thisapplication, to improve flexibility of the solution.

The notification display method in this application is described above,and a terminal in this application is described below. Referring to FIG.15, an embodiment of a terminal is provided according to an embodimentof this application, including: a matching module 1501, a display module1502, and an analysis module 1503.

When there is a to-be-notified event, the matching module 1501 isconfigured to: obtain matching information from object information ofthe to-be-notified event, and match the matching information against arule in a rule repository. The display module 1502 is configured todisplay, if the matching performed by the matching module 1501 succeeds,a notification corresponding to the to-be-notified event byclassification based on a notification type corresponding to thematching rule. The analysis module 1503 is configured to: extract, ifthe matching performed by the matching module 1501 fails, at least onepiece of feature information from the object information of theto-be-notified event, and analyze the feature information by using aclassification model. The display module 1502 is alternativelyconfigured to display a notification corresponding to the to-be-notifiedevent by classification based on a notification type obtained by ananalysis by the analysis module.

Each rule in the rule repository includes at least one condition, andeach rule corresponds to one notification type. The object informationof the to-be-notified event includes at least text information, jumpinformation, and application package name information corresponding tothe to-be-notified event.

In some embodiments, the rule in the rule repository includes at leastone first text matching condition, at least one second text matchingcondition, an application package name matching condition correspondingto each second text matching condition, at least one jump matchingcondition, and an application package name matching conditioncorresponding to each jump matching condition.

The matching module 1501 is specifically configured to: obtain the textinformation from the object information of the to-be-notified event, andmatch the text information against a first text matching condition inthe rule.

The matching module 1501 is specifically configured to: obtain the textinformation and the application package name information from the objectinformation of the to-be-notified event, match the text informationagainst a second text matching condition in the rule, and match theapplication package name information against an application package namematching condition corresponding to the second text matching conditionin the rule.

The matching module 1501 is specifically configured to: obtain the jumpinformation and the application package name information from the objectinformation of the to-be-notified event, match the jump informationagainst a jump matching condition in the rule, and match the applicationpackage name information against an application package name matchingcondition corresponding to the jump matching condition.

In this embodiment, the jump information may include: standard jumpinformation and self-defined jump information.

In some embodiments, the classification model may include: a textclassification model, a jump classification model, and a fusionclassification model.

The analysis module 1503 is specifically configured to: extract a jumpinformation eigenvector and a text information eigenvector from theobject information of the to-be-notified event, analyze the textinformation eigenvector by using the text classification model, toobtain a first category, analyze the jump information eigenvector byusing the jump classification model, to obtain a second category, andanalyze the first category and the second category by using the fusionclassification model, to obtain an analysis result. The analysis resultcorresponds to one notification type.

More specifically, in a process of extracting the jump informationeigenvector and the text information eigenvector, the classificationmodel 153 may be configured to: obtain the jump information from theobject information, divide a value of each field in the jump informationinto a plurality of characters, and combine the plurality of charactersthrough vectorization, to obtain the jump information eigenvector.

In some embodiments, the display module 1502 is specifically configuredto display a notification corresponding to a to-be-notified event of asame notification type in a same display pane in a centralized manner,that is, display a notification in a display pane corresponding to anotification type to which the notification belongs.

In one embodiment, when being configured to display a notificationcorresponding to a to-be-notified event of a same notification type in asame display pane in a centralized manner, the display module 1502 isspecifically configured to display the notification of the notificationtype in expanded form in the display pane in a centralized manner.

In one embodiment, when being configured to display a notificationcorresponding to a to-be-notified event of a same notification type in asame display pane in a centralized manner, the display module 1502 isspecifically configured to: centralize the notification of thenotification type in one display pane, determine a display mode of thenotification in the display pane based on a priority of the obtainednotification, and display the notification in the display pane incorresponding display mode. The display mode includes: displaying inexpanded form or displaying in collapsed form. Alternatively, thedisplay mode includes: displaying in a first mode or displaying in asecond mode, and content displayed in the first mode is more thancontent displayed in the second mode.

When the display module 1502 is configured to display the notificationin the second mode, the display module 1502 may be further configured todisplay the notification in the first mode in response to a detectedinput operation performed on the displayed notification.

In one embodiment, the terminal further includes a determining module.The determining module is configured to obtain priority informationcorresponding to the notification, and determine the prioritycorresponding to the notification based on the priority information. Thepriority information includes at least one of the following: firstpriority information corresponding to the notification type to which thenotification belongs, second priority information of an applicationcorresponding to the notification, and user usage habit informationcorresponding to the notification.

The user usage habit information includes at least one of the following:user historical notification tapping frequency information, userhistorical notification deletion frequency information, and user profileinformation.

In the embodiments of this application, when there is a to-be-notifiedevent, the matching module 1501 may match the matching informationagainst the rule in the rule repository, to obtain the notificationtype; the analysis module 1503 may analyze the feature information byusing the classification model, to obtain the notification type; and thedisplay module 1502 may display the notification by classification basedon the notification type. The rules in the rule repository and theclassification model are determined based on a large amount of sampledata that is manually labeled with the notification types, so thataccurate classification of notifications may be achieved to meetrequirements of users, to help the users to screen out notifications ofinterest, thereby improving user experience.

It should be understood that, the process performed by each module inthe terminal corresponding to FIG. 15 is similar to the method processdescribed in the embodiment shown in FIG. 4. Details are not describedherein again.

This application further provides another terminal. Referring to FIG.16, an embodiment of a terminal according to an embodiment of thisapplication includes: a display module 1601, configured to: display,when there is a to-be-notified event, a notification by classificationbased on a notification type of the notification, and display indifferent display modes based on a priority of the notification.Specifically, the different display modes may include the following twodisplay modes: displaying in expanded form and displaying in collapsedform. Alternatively, the different display modes include the followingtwo display modes: displaying in a first mode and displaying in a secondmode, and content displayed in the first mode is more than contentdisplayed in the second mode.

In some embodiments, when displaying the notification by classification,the display module 1601 is specifically configured to display anotification corresponding to a to-be-notified event of a samenotification type in a same display pane in a centralized manner, thatis, display the notification that belongs to a same notification type inone display pane in a centralized manner.

In one embodiment, when displaying the notification in a same displaypane in a centralized manner, the display module 1601 may be configuredto display the notification in expanded form in a corresponding displaypane.

In one embodiment, when displaying the notification in a same displaypane in a centralized manner, the display module 1601 may be configuredto: determine a display mode of the notification in a correspondingdisplay pane based on the priority of the notification corresponding tothe to-be-notified event, and display the notification based on thedetermined display mode. The display mode may include: displaying inexpanded form or displaying in collapsed form, or may include:displaying in a first mode or displaying in a second mode, and contentdisplayed in the first mode is more than content displayed in the secondmode.

When the display module 1601 is configured to display the notificationin the second mode, the display module 1601 is further configured todisplay the notification in the first mode in response to a detectedinput operation performed on the notification.

In one embodiment, the terminal further includes an obtaining module,configured to determine the priority corresponding to the notificationbased on the obtained priority information. The priority informationincludes at least one of the following: first priority informationcorresponding to the notification type to which the notificationbelongs, second priority information of an application corresponding tothe notification, and user usage habit information corresponding to thenotification.

The user usage habit information may include at least one of thefollowing: user historical notification tapping frequency information,user historical notification deletion frequency information, and userprofile information.

It should be understood that, the process performed by each module inthe terminal corresponding to FIG. 16 is similar to the method processdescribed in the embodiment shown in FIG. 13. Details are not describedherein again.

In this embodiment, the display module 1601 may display the notificationin different modes based on the priority of the notification. Lesscontent may be displayed for the notification that has a relatively lowpriority, and more content may be displayed for the notification thathas a high priority. In this case, the user may be allowed to quicklyfind out notifications of interest on the notification displayinterface, thereby improving search efficiency and improving userexperience.

In addition, a plurality of modes of displaying the notification by thedisplay module 1601 are provided in this embodiment of this application,to improve flexibility of the solution.

The terminal in this application is described above from a perspectiveof a functional module, and a terminal in this application is describedbelow from a perspective of an entity hardware. For specific details,refer to FIG. 17. An embodiment of a terminal 1700 is provided accordingto an embodiment of this application, including:

one or more processors 1701, a memory 1702, and a display 1703.

The terminal 1700 further includes a bus 1704.

The processor 1701, the memory 1702, and the display 1703 are connectedby using the bus 1704.

The bus 1704 may be a peripheral component interconnect (peripheralcomponent interconnect, PCI for short) bus, an extended industrystandard architecture (extended industry standard architecture, EISA forshort) bus, and or the like. The bus may be classified into an addressbus, a data bus, a control bus, and the like. For ease ofrepresentation, only one thick line is used to represent the bus in FIG.17, but this does not mean that there is only one bus or only one typeof bus.

The processor 1701 may be a central processing unit (central processingunit, CPU for short), a network processor (network processor, NP forshort), or a combination of a CPU and an NP.

The processor 1701 may further include a hardware chip. The hardwarechip may be an application-specific integrated circuit(application-specific integrated circuit, ASIC for short), aprogrammable logic device (programmable logic device, PLD for short), ora combination thereof. The foregoing PLD may be a complex programmablelogic device (complex programmable logic device, CPLD for short), afield-programmable logic gate array (field-programmable logic gatearray, FPGA for short), a generic array logic (generic array logic, GALfor short), or any combination thereof.

The memory 1702 may include a volatile memory (volatile memory), forexample, a random access memory (random access memory, RAM for short);or the memory may also include a nonvolatile memory (nonvolatilememory), for example, a flash memory (flash memory), a hard disk drive(hard disk drive, HDD for short), or a solid-state drive (solid-statedrive, SSD for short); or the memory 1702 may further include acombination of the foregoing memories.

In one embodiment, the memory 1702 is configured to store a programinstruction, and the processor 1701 invokes the program instructionstored in the memory 1702, so that the terminal performs one or moreoperations or the optional implementations in the embodiment shown inFIG. 4 or FIG. 13.

An embodiment of this application further provides a computer storagemedium. The computer storage medium is configured to store a computersoftware instruction used by the foregoing terminal, and the computersoftware instruction includes a program designed for the terminal andconfigured for implementation.

An embodiment of this application further provides a computer programproduct. The computer program product includes a computer softwareinstruction, and the computer software instruction may be loaded byusing a processor to implement a process of the notification displaymethod shown in FIG. 4 or FIG. 13.

All or some of the foregoing embodiments may be implemented by usingsoftware, hardware, firmware, or any combination thereof. When softwareis used to implement the embodiments, the embodiments may be implementedcompletely or partially in a form of a computer program product.

The computer program product includes one or more computer instructions.When the computer program instructions are loaded and executed on acomputer, a procedure or functions according to the embodiments of thepresent invention are all or partially generated. The computer may be ageneral-purpose computer, a special-purpose computer, a computernetwork, or another programmable apparatus. The computer instructionsmay be stored in a computer-readable storage medium or may betransmitted from a computer-readable storage medium to anothercomputer-readable storage medium. For example, the computer instructionsmay be transmitted from a website, computer, server, or data center toanother website, computer, server, or data center in a wired (forexample, a coaxial cable, an optical fiber, or a digital subscriber line(DSL)) or wireless (for example, infrared, radio, or microwave) manner.The computer-readable storage medium may be any usable medium accessibleby a computer, or a data storage device, such as a server or a datacenter, integrating one or more usable media. The usable medium may be amagnetic medium (for example, a floppy disk, a hard disk, or a magnetictape), an optical medium (for example, a DVD), a semiconductor medium(for example, a solid state drive (SSD)), or the like.

It may be clearly understood by a person skilled in the art that, forthe purpose of convenient and brief description, for a detailed workingprocess of the foregoing system, apparatus, and unit, refer to acorresponding process in the foregoing method embodiments, and detailsare not described herein again.

In the several embodiments provided in this application, it should beunderstood that the disclosed system, apparatus, and method may beimplemented in other manners. For example, the described apparatusembodiment is merely an example. For example, the unit division ismerely logical function division and may be other division in actualimplementation. For example, a plurality of units or components may becombined or integrated into another system, or some features may beignored or not performed. In addition, the displayed or discussed mutualcouplings or direct couplings or communication connections may beimplemented by using some interfaces. The indirect couplings orcommunication connections between the apparatuses or units may beimplemented in electronic, mechanical, or other forms.

The units described as separate parts may or may not be physicallyseparate, and parts displayed as units may or may not be physical units,may be located in one position, or may be distributed on a plurality ofnetwork units. Some or all of the units may be selected based on actualrequirements to achieve the objectives of the solutions of theembodiments.

In addition, functional units in the embodiments of this application maybe integrated into one processing unit, or each of the units may existalone physically, or two or more units are integrated into one unit. Theintegrated unit may be implemented in a form of hardware, or may beimplemented in a form of a software functional unit.

When the integrated unit is implemented in the form of a softwarefunctional unit and sold or used as an independent product, theintegrated unit may be stored in a computer-readable storage medium.Based on such an understanding, the technical solutions of thisapplication essentially, or the part contributing to the prior art, orall or some of the technical solutions may be implemented in the form ofa software product. The software product is stored in a storage mediumand includes several instructions for instructing a computer device(which may be a personal computer, a server, or a network device) toperform all or some of the operations of the methods described in theembodiments of this application. The foregoing storage medium includes:any medium that can store program code, such as a USB flash drive, aread-only memory (ROM for short), a random access memory (RAM forshort), a magnetic disk, or an optical disc.

The foregoing embodiments are merely intended to describe the technicalsolutions of this application, but not for limiting this application.Although this application is described in detail with reference to theforegoing embodiments, persons of ordinary skill in the art shouldunderstand that they may still make modifications to the technicalsolutions described in the foregoing embodiments or make equivalentreplacements to some technical features thereof, without departing fromthe scope of the technical solutions of the embodiments of thisapplication.

1-13. (canceled)
 14. A notification display method, comprising: whenthere is a to-be-notified event, displaying, by a terminal, anotification by classification based on a notification type of thenotification corresponding to the to-be-notified event; and displaying,by the terminal, in different display modes based on a priority of thenotification, wherein the different display modes comprise: displayingin an expanded form or displaying in a collapsed form in a correspondingdisplay pane, or the different display modes comprise: displaying in afirst mode or displaying in a second mode in the corresponding displaypane, and content displayed in the first mode is more than contentdisplayed in the second mode.
 15. The method according to claim 14,wherein the displaying, by a terminal, a notification by classificationbased on a notification type of the notification corresponding to theto-be-notified event comprises: displaying, by the terminal, anotification corresponding to the to-be-notified event of the samenotification type in a same display pane in a centralized manner. 16.The method according to claim 15, wherein the displaying, by a terminal,a notification by classification comprises: displaying, by the terminal,the notification in the expanded form in the corresponding display pane.17. The method according to claim 15, wherein the displaying, by aterminal, a notification by classification comprises: determining, bythe terminal, a display mode of the notification in the correspondingdisplay pane based on the priority of the notification corresponding tothe to-be-notified event; and displaying the notification based on thedetermined display mode.
 18. The method according to claim 17, whereinthe displaying, by the terminal, a notification by classificationfurther comprises: when the terminal displays the notification in thesecond mode, displaying, by the terminal, the notification in the firstmode in response to detecting an input operation performed on thedisplayed notification.
 19. The method according to claim 17, whereinthe priority of the notification is determined based on a priorityinformation, wherein the priority information comprises at least one ofthe following: first priority information corresponding to thenotification type corresponding to the notification; second priorityinformation of an application corresponding to the notification; or userusage habit information corresponding to the notification.
 20. Themethod according to claim 19, wherein the user usage habit informationcomprises at least one of the following: user historical notificationtapping frequency information; user historical notification deletionfrequency information; or user profile information. 21-53. (canceled)54. The method according to claim 15, wherein the displaying, by theterminal, a notification by classification comprises: obtaining, by theterminal, the priority of the notification; and determining, by theterminal, a display mode of the notification in the correspondingdisplay pane based on the priority, wherein the display mode comprises:displaying in a first mode or displaying in a second mode in thecorresponding display pane, and a size of content displayed in the firstmode is larger than a size of content displayed in the second mode. 55.A terminal, wherein the terminal comprises: a touchscreen, wherein thetouchscreen comprises a touch-sensitive surface and a display; one ormore processors; a memory; and one or more computer programs stored inthe memory, wherein the one or more computer programs compriseinstructions, which when executed by the one or more processors, causethe terminal to perform operations, the operations comprising: whenthere is a to-be-notified event, displaying a notification byclassification based on a notification type of the notificationcorresponding to the to-be-notified event; and displaying in differentdisplay modes based on a priority of the notification, wherein thedifferent display modes comprise: displaying in an expanded form ordisplaying in a collapsed form in a corresponding display pane, or thedifferent display modes comprise: displaying in a first mode ordisplaying in a second mode in the corresponding display pane, andcontent displayed in the first mode is more than content displayed inthe second mode.
 56. The terminal according to claim 55, whereindisplaying, by a terminal, a notification by classification based on anotification type of the notification corresponding to theto-be-notified event comprises: displaying a notification correspondingto the to-be-notified event of the same notification type in a samedisplay pane in a centralized manner.
 57. The terminal according toclaim 56, wherein displaying, by a terminal, a notification byclassification comprises: displaying the notification in the expandedform in the corresponding display pane.
 58. The terminal according toclaim 56, wherein displaying, by a terminal, a notification byclassification comprises: determining a display mode of the notificationin the corresponding display pane based on the priority of thenotification corresponding to the to-be-notified event; and displayingthe notification based on the determined display mode.
 59. The terminalaccording to claim 58, wherein the operations further comprise:displaying in the first mode or displaying in the second mode in thecorresponding display pane, and the content displayed in the first modeis more than the content displayed in the second mode; and thedisplaying a notification by classification further comprises: when thenotification is displayed in the second mode, displaying thenotification in the first mode in response to detecting an inputoperation performed on the displayed notification.
 60. The terminalaccording to claim 58, wherein the priority of the notification isdetermined based on a priority information, wherein the priorityinformation comprises at least one of the following: first priorityinformation corresponding to the notification type corresponding to thenotification; second priority information of an applicationcorresponding to the notification; or user usage habit informationcorresponding to the notification.
 61. The terminal according to claim60, wherein the user usage habit information comprises at least one ofthe following: user historical notification tapping frequencyinformation; user historical notification deletion frequencyinformation; or user profile information.
 62. The terminal according toclaim 56, wherein displaying a notification by classification comprises:obtaining, by the terminal, a priority of the notification; anddetermining, by the terminal, a display mode of the notification in thecorresponding display pane based on the priority, wherein the displaymode comprises: displaying in a first mode or displaying in a secondmode in the corresponding display pane, and a size of content displayedin the first mode is larger than a size of content displayed in thesecond mode.
 63. A non-transitory computer-readable storage medium,comprising an instruction, which when executed by a processor of aterminal, cause the processor to perform operations, the operationscomprising: when there is a to-be-notified event, displaying anotification by classification based on a notification type of thenotification corresponding to the to-be-notified event; and displaying,by the terminal, in different display modes based on a priority of thenotification, wherein the different display modes comprise: displayingin an expanded form or displaying in a collapsed form in a correspondingdisplay pane, or the different display modes comprise: displaying in afirst mode or displaying in a second mode in the corresponding displaypane, and content displayed in the first mode is more than contentdisplayed in the second mode.
 64. The computer-readable storage mediumaccording to claim 63, wherein displaying a notification byclassification based on a notification type of the notificationcorresponding to the to-be-notified event comprises: displaying anotification corresponding to the to-be-notified event of the samenotification type in a same display pane in a centralized manner. 65.The computer-readable storage medium according to claim 64, whereindisplaying a notification by classification comprises: displaying thenotification in the expanded form in the corresponding display pane. 66.The computer-readable storage medium according to claim 64, whereindisplaying a notification by classification comprises: determining adisplay mode of the notification in the corresponding display pane basedon the priority of the notification corresponding to the to-be-notifiedevent; and displaying the notification based on the determined displaymode.